No module named ‘tqdm’

Each Answer to this Q is separated by one/two green lines.

I am running the following pixel recurrent neural network (RNN) code using Python 3.6

import os
import logging

import numpy as np
from tqdm import trange
import tensorflow as tf

from utils import *
from network import Network
from statistic import Statistic

However, there was an error:

ModuleNotFoundError: No module named 'tqdm'

Does anyone know how to solve it?

You need to install tqdm module, you can do it by using python pip.

pip install tqdm

for more info tqdm

For Python 3 as you specified, you use the pip3 command, like so…

pip3 install tqdm

For Python 2, you use pip command, like so…

pip install tqdm

Hope this helps!

or you can use conda install -c conda-forge tqdm Sometimes help

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:

anaconda3

Ubuntu machines:

sudo /usr/bin/python3.5 -m pip install tqdm

In Anaconda, steps to install the package.

  1. Navigate to ‘Environments” and Search for your package.
  2. That package will be displayed and click on Apply.

Now the package is installed and it can be used right away.

Please share your feedback.

If you have installed it, type :

from tqdm import tqdm

at the beggining of your code


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 .