I am trying to use the tqdm package, but it doesn't work

I am trying to implement a progress bar to my Python code in VS Code. I have installed the tqdm package through pip3 install tqdm. However, in my code, that package seems to not exist, even though I can see it installen through pip3 list. I have tried to do everything, including installing and uninstalling the package, restarting my computer, restarting the language server, etc.
Note: If I install and use the tqdm package in PyCharm, it works. It’s a problem of VS Code, I guess.

You likely have more than 1 python on your system. pip3 install tqdm is likely installing it in a python other than what your IDE is using. Try running python3 -m pip install tqdm or use virtual environments. It’s highly recommended that you always make a new virtual environment for every project.

1 Like

Actually, you were right. I solved the problem by making new scripts with the same code, in a different folder, with a new virtual environment. There I installed the packages again. Thanks!