lia*_*mhp 6 python progress-bar jupyter-notebook ipywidgets tqdm
我正在尝试运行一个非常简单的 tqdm 脚本:
from tqdm.notebook import tqdm
for i in tqdm(range(10)):
time.sleep(1)
Run Code Online (Sandbox Code Playgroud)
但我遇到了:
IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
Run Code Online (Sandbox Code Playgroud)
我的 ipywidgets 是 v8.0.4,jupyter v1.0.0...tqdm 不再与 VS Code Jupyter Notebook 一起使用吗?
我有同样的问题。使用这篇文章,我通过运行解决了这个问题:
%pip install --upgrade jupyter ipywidgets
%jupyter nbextension enable --py widgetsnbextension # removed !pip on the recommendation of a comment.
import time
from tqdm.notebook import tqdm
for i in tqdm(range(10)):
time.sleep(0.1)
Run Code Online (Sandbox Code Playgroud)
这个小语法解决了我的问题
conda install -c conda-forge ipywidgets
Run Code Online (Sandbox Code Playgroud)
安装后请记住重新启动内核。直到我重新启动 VS Code 后它才起作用。希望能帮助到你
| 归档时间: |
|
| 查看次数: |
3304 次 |
| 最近记录: |