0

I have installed tqdm using pip install tqdm

but I still got an error that ModuleNotFoundError: No module named 'tqdm', how can I fix this?

my code looks like this from tqdm import tqdm

Shazman
  • 11
  • 4

2 Answers2

0

Here are some options I can advise:

  1. Check that you have tdqm with pip show tdqm
  2. Check that you're using the correct virtual environment.
  3. You can try uninstall and then reinstall it again.
  • I checked the `tdqm`, which is on my package list. I am using `Python 3.10.1`. I tried uninstalling and reinstalled it, still not working. How can I check if I am using the correct virtual environment? – Shazman Jan 24 '23 at 19:53
  • I'm not sure what to answer actually. You can try to check whether you're using the correct environment. Or just try to reinstall package and might be this will help – Maruf Karaev Jan 24 '23 at 19:56
  • You can use `which python` command to see the python executable you're using – Maruf Karaev Jan 24 '23 at 19:57
  • The `tdqm` package is installed in `Location: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages`, but I am using a virtual environment and the location is `.\bin\python`. how can I install `tdqm` package in my virtual environment? thank you – Shazman Jan 24 '23 at 20:00
  • I tried `which python`, it shows I am using `/Library/Frameworks/Python.framework/Versions/3.10/bin/python`. – Shazman Jan 24 '23 at 20:02
0
  1. If you use a virtual environment, ensure the correct environment is activated.

  2. Also, you might need to use pip3 instead of pip, as in pip3 install tqdm.

  3. Finally, check if you have multiple versions of python installed. For Windows/Mac/Linux. If you have multiple versions of python. Delete unused versions.

g.newt
  • 105
  • 3