32

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?

A. Syam
  • 491
  • 1
  • 5
  • 9

5 Answers5

38

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

pip install tqdm

for more info tqdm

pushpendra chauhan
  • 1,750
  • 3
  • 16
  • 27
  • 7
    I believe `pip` is only for Python 2.x. You have to use `pip3` for Python 3.x as shown in my answer. Essentially the same thing. Just add the suffix '3'. – Mark A. Donohoe May 15 '18 at 14:43
12

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!

Mark A. Donohoe
  • 23,825
  • 17
  • 116
  • 235
5

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

ysf
  • 3,793
  • 3
  • 19
  • 24
Nelson Bape
  • 51
  • 1
  • 1
4

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
Victor
  • 164
  • 7
  • **Note:** If you're using Conda then you should install tqdm (and all modules when possible) with Conda itself, not pip. – AMC Mar 29 '20 at 22:22
2

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.

Nages
  • 701
  • 1
  • 8
  • 11