ModuleNotFoundError: No module named 'tqdm' after reinstall

78 Views Asked by At

So I've been trying to use the module named tqdm to add a progress bar in my program. However it seems to be installed but my terminal won't run it. It shows up in pip3 list command but doesn't work I'm on macOs using PyCharm and it also show that I have it up and running.

I've tried to reinstall python, from 3.12 to 3.10. Reinstall the module tqdm, switch the shebang, change how I import it.

1

There are 1 best solutions below

0
On

Couple of questions to add more context to your question:

  • Are you using a venv (or e.g. conda) in your terminal or in PyCharm?
  • Which interpreter is selected in PyCharm?
  • Do you have multiple python/pip versions installed? (e.g. python -V vs python3 -V, same with pip vs pip3)
  • Did you confirm that you're using the same python environment in your terminal and in PyCharm?
  • Have you tried using python3 -m pip install tqdm instead of pip3 to ensure you're using the appropriate pip?
  • Have you restarted your PyCharm since reinstalling things?
  • What's the output of the following command inside of python (both terminal and PyCharm)?
import subprocess
import sys

subprocess.check_output([sys.executable, '-m', 'pip', 'freeze']).decode('utf-8')

These types of issues stem from the same sources, so your answers to the questions will help us debug it:

  • Ensure your python installation is correct
  • Ensure you're using the appropriate pip for your python env
  • Ensure you're using the same envs across tools (terminal vs PyCharm)
  • Ensure the libraries are installed