Jupyter Notebook中的Tqdm 4.28.1“未找到IntProgress。请更新jupyter和ipywidgets。”

use*_*710 9 python jupyter-notebook tqdm

我正在尝试在我的Python代码中使用tqdm_notebook,但是我遇到了这个错误

import tqdm

for i in tqdm.tqdm_notebook(range(2, int(total_number)//20):i
Run Code Online (Sandbox Code Playgroud)

错误:

IntProgress not found. Please update jupyter and ipywidgets.
ImportError: IntProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
Run Code Online (Sandbox Code Playgroud)

我正在使用Python 3.7.1和tqdm版本(4.28.1)

Mar*_*ark 13

对于那些不使用 conda 的人:

pip3 install ipywidgets --user

  • 另外,不要忘记在安装后重新启动 Jupyter Notebook 的内核。 (6认同)

小智 12

这对我有用。

conda install -c conda-forge ipywidgets
jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)

之后重新启动jupyter笔记本即可。

最初来自这里的解决方案:https : //github.com/tqdm/tqdm/issues/187

  • 确保这些安装在笔记本电脑正在使用的环境中!我从基本环境运行 jupyter 笔记本,并在笔记本中选择不同的 conda 环境。这不起作用。 (5认同)
  • 就我而言,只需运行“conda install ipywidgets”就足够了,不需要“jupyter nbextension enable --py widgetsnbextension” (3认同)

giv*_*rld 11

这对我来说效果很好:

conda install ipywidgets==7.4.2
Run Code Online (Sandbox Code Playgroud)

  • 或者,`pip install ipywidgets==7.4.2` (4认同)

use*_*710 5

啊我的坏!只需要安装 jupyter 和 ipywidgets 包!