Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tqdm notebook bar outputs text in Jupyter lab

I am having a problem when using tqdm.notebook progress bar in Jupyter (version 3.4.4). When I launch a for loop, instead of the progress bar, I get the following text as output:

Input:

from tqdm.notebook import tqdm

for i in tqdm(range(100)):
    a = 1

Output:

root:
    n: 0
    total: 100
    elapsed: 0.01399087905883789
    ncols: null
    nrows: 29
    prefix: ""
    ascii: false
    unit: "it"
    unit_scale: false
    rate: null
    bar_format: null
    postfix: null
    unit_divisor: 1000
    initial: 0
    colour: null

This started happening after I updated Jupyter to its latest version. The usual solutions regarding Node.js and ipywidgets (see this one) didn't do the job.

tqdm is also in its last version (4.63.0).

like image 363
gorka.munoz Avatar asked Dec 18 '25 17:12

gorka.munoz


1 Answers

I ran across this in a dockerized jupyterlab service. This fixed it for me:

(Done in the Dockerfile):

  1. pip install -U jupyterlab-widgets==1.1.1
  2. pip install -U ipywidgets==7.7.2
like image 195
aaronrmm Avatar answered Dec 20 '25 07:12

aaronrmm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!