这是我在 jupyter notebook 中运行的代码:
from tqdm.notebook import tqdm
for i in tqdm(range(0, 100000)):
continue
我收到的不是进度条,而是以下消息:
HBox(children=(FloatProgress(value=0.0, max=100000.0), HTML(value='')))
如果我改用 from tqdm import tqdm
,它确实可以正常工作。
最佳答案
您需要安装 ipywidgets jlab 扩展 https://ipywidgets.readthedocs.io/en/stable/user_install.html#installing-the-jupyterlab-extension
关于python - tqdm.notebook 在 jupyter notebook 中显示带有 "HBox"而不是进度条的消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62440322/