93

I am trying to use tqdm_notebook in my Python code, but I am running into this error

import tqdm

for i in tqdm.tqdm_notebook(range(2, int(total_number)//20):i

ERROR:

IntProgress not found. Please update jupyter and ipywidgets.
ImportError: IntProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html

I am using Python 3.7.1 and tqdm version (4.28.1)

Zoe
  • 27,060
  • 21
  • 118
  • 148
user3759710
  • 1,023
  • 1
  • 7
  • 8

4 Answers4

119

This worked for me.

conda install -c conda-forge ipywidgets
jupyter nbextension enable --py widgetsnbextension

Restarting jupyter notebook afterwards worked.

Solution originally from here.

ashraful16
  • 2,742
  • 3
  • 11
  • 32
yueyanw
  • 1,301
  • 1
  • 7
  • 9
  • 5
    Make sure these are installed in the environment the notebook is using! I was running jupyter notebook from the base environment and selecting a different conda environment in the notebook. This didn't work. – user3731622 Sep 23 '19 at 23:12
  • Installing this kills Jupyter Lab for me. Cells don't run and it disconnects from the kernel. – Denziloe Dec 05 '20 at 04:29
  • 1
    Update: I think that was a problem with the current version, ipywidgets 7.5.1. `conda install ipywidgets==7.4.2` fixed it. – Denziloe Dec 05 '20 at 04:50
  • 3
    In my case just running `conda install ipywidgets` was enough, there was no need for `jupyter nbextension enable --py widgetsnbextension` – Redoman Feb 25 '22 at 02:08
  • @JfredoJ , your solution worked out for me. However, the fact is that you should install ipywidgets to the environment in which your kernel runs; not to the one in which your jupyter runs. – iliTheFallen Apr 14 '22 at 18:16
  • @iliTheFallen why does it matter? Important is ipywidgets can be found, isn't it? In my case I installed it in the environment where I'm running jupyter, and I think it worked without problems... Perhaps your speaking from a logical / organizational point of view? – Redoman Apr 17 '22 at 10:36
55

For those not using conda:

pip3 install ipywidgets --user

moo
  • 1,597
  • 1
  • 14
  • 29
10

This works fine for me:

conda install ipywidgets==7.4.2
enigma
  • 1,029
  • 10
  • 11
6

ah my bad ! Just had to install the packages jupyter and ipywidgets!

user3759710
  • 1,023
  • 1
  • 7
  • 8