[Solved] Error when importing the tqdm module in Python

I have a script that imports the Python tqdm module.

I can import the tqdm module from a Jupyter notebook, for instance, but not when running the script from the command line.

When running the script from the command line, I see the following error message:

File "", line 19, in <module> from tqdm import tqdm
    ImportError: No module named tqdm

My script is called from a command line as follows:

python <arg1> <arg2>

My environment variables are:


C:Users<joesmithAppDataLocalContinuumAnaconda2;C:UsersjoesmithAppDataLocalContinuumAnaconda2Scripts;C:UsersjoesmithAppDataLocalContinuumAnaconda2Librarybin; C:CompanyLibspython-2.7Windows_x86


C:UsersjoesmithAppDataLocalContinuumAnaconda2;C:UsersjoesmithAppDataLocalContinuumAnaconda2Scripts;C:UsersjoesmithAppDataLocalContinuumAnaconda2Librarybin; C:CompanyLibspython-2.7Windows_x86

Does anyone see why this error is occurring?


Solution #1:

In Anaconda this worked for me:

sudo <anaconda path>/bin/python3.6 -m pip install tqdm 

(after your working env is activated)

On my linux machine I substituted <anaconda path> with:


In your machine try with Anaconda2 once inside your working env for your machine like so:

sudo Anaconda2/Library/bin/python-2.7 -m pip install tqdm

Make sure you have pip installed.

Respondent: Victor

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy