在Jupyter(版本3.4.4(中使用tqdm.notebook
进度条时遇到问题。当我启动for循环时,我得到的不是进度条,而是以下文本作为输出:
输入:
from tqdm.notebook import tqdm
for i in tqdm(range(100)):
a = 1
输出:
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
这是在我将Jupyter更新到其最新版本后开始发生的。关于Node.js和ipywidgets的常见解决方案(请参阅此解决方案(没有起到作用。
tqdm
也是最后一个版本(4.63.0(
我在一个码头化的jupyterlab服务中遇到了这个问题。这为我修复了它:
(在Dockerfile中完成(:
pip install -U jupyterlab-widgets==1.1.1
pip install -U ipywidgets==7.7.2