[Solved] ModuleNotFoundError: No module named ‘tqdm’

While are you trying to import the ‘tqdm‘ module without installing the package or If you install it in an incorrect environment. Then you will face ModuleNotFoundError: No module named ‘tqdm’, this error.

In this article, we will discuss about this ModuleNotFoundError: No module named ‘tqdm’ error in Python. And how to resolve the error all the possible solutions with examples.

How to ModuleNotFoundError: No module named ‘tqdm’ Error Occurs?

Most of the time you get this error while the Python interpreter cannot detect the tqdm in your current environment.

ModuleNotFoundError: No module named 'tqdm'

How To Fix ModuleNotFoundError: No module named ‘tqdm’ Error?

There are different ways to fix ModuleNotFoundError: No module named ‘tqdm’ this error. Let us take a look at every solution.

  • How To Fix ModuleNotFoundError: No module named ‘tqdm’ Error?

For the Solve ModuleNotFoundError: No module named ‘tqdm’ Error First you need to install tqdm module by using this pip command. So, opening your terminal in your project’s root directory then run this command: pip3 install tqdm. Now, I hope your error will be solved.

Solution 1: install tqdm module

You need to install tqdm module by using this pip command below.

pip install tqdm

If you are using python3 then you should run the pip3 command.

pip3 install tqdm

Now, I hope your error will be solved.

Solution 2: Installing tqdm inside the virtual environment

You have to create a virtual environment if you don’t have one.

# 👇️ For python3 Create a virtual Environment
python3 -m venv venv

Now Activate the virtual environment.

# 👇️ Activate the virtual environment (windows command)
venv\Scripts\activate.bat

# 👇️ Activate the virtual environment (windows powershell)
venv\Scripts\Activate.ps1

Activate the virtual environment On Linux.

source venv/bin/activate

Now Install tqdm inside the virtual environment below the command.

pip install tqdm

Solution 3: Uninstall the tqdm package

If the error not solved, then try to uninstall the tqdm package and then install it.

# 👇️ check if you have tqdm installed
pip3 show tqdm

# 👇️ uninstall tqdm
pip3 uninstall tqdm

# 👇️ install tqdm
pip3 install tqdm

Now, I hope your error will be solved.

Conclusion

In this article, we have discussed what causes the error and we have discussed ways to fix the error.

we hope this article has been informative. Thank you for reading. Kindly comment and let us know if you found it helpful.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Categories