gor*_*noz 17 python jupyter-notebook tqdm
tqdm.notebook我在 Jupyter(版本 3.4.4)中使用进度条时遇到问题。当我启动 for 循环时,我得到以下文本作为输出,而不是进度条:
输入:
from tqdm.notebook import tqdm
for i in tqdm(range(100)):
a = 1
Run Code Online (Sandbox Code Playgroud)
输出:
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
Run Code Online (Sandbox Code Playgroud)
在我将 Jupyter 更新到最新版本后,这种情况开始发生。有关 Node.js 和 ipywidgets 的常用解决方案(请参阅此解决方案)无法完成这项工作。
tqdm也是最后一个版本(4.63.0)。
小智 14
我在 dockerized jupyterlab 服务中遇到了这个问题。这为我解决了这个问题:
(在 Dockerfile 中完成):
pip install -U jupyterlab-widgets==1.1.1pip install -U ipywidgets==7.7.2