当我在迭代中使用 tqdm_notebook
:
from tqdm import tqdm_notebook as tqdm
它只显示:
HBox(children=(IntProgress(value=1, bar_style='info', max=1), HTML(value='')))
我该怎么做?
当我在迭代中使用 tqdm_notebook
:
from tqdm import tqdm_notebook as tqdm
它只显示:
HBox(children=(IntProgress(value=1, bar_style='info', max=1), HTML(value='')))
我该怎么做?
可能您没有安装ipywidgets。
对于Jupyter Notebook,您可以使用以下命令检查:
$ jupyter nbextension list
对于Jupyter Lab,您可以使用以下命令检查:
$ jupyter labextension list
安装ipywidgets的过程在这里有描述。
在JupyterLab中使用:
安装ipywidgets包:
使用pip
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
使用conda
conda install -c conda-forge ipywidgets
(使用conda安装ipywidgets也会为您启用扩展。)
然后运行以下命令安装Jupyter小部件扩展以支持FigureWidget(请注意,这将需要在您的系统中安装nodeJs):
jupyter labextension install @jupyter-widgets/jupyterlab-manager