JupyterLab运行tqdm遇JS报错:无法加载VBoxModel类
JupyterLab tqdm JS报错解决方法
问题原因
当前JupyterLab中安装的@jupyter-widgets/controls版本为2.0.0,但tqdm依赖的组件需要该包的^1.5.0版本,版本不兼容导致加载失败。
解决步骤
卸载现有冲突组件
- 卸载Python端包:
pip uninstall -y ipywidgets jupyterlab-widgets - 卸载JupyterLab扩展:
jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager
- 卸载Python端包:
安装兼容版本的组件
- 安装匹配
^1.5.0版本控件的Python包:pip install ipywidgets==7.7.1 jupyterlab-widgets==3.0.9 - 安装对应的JupyterLab扩展:
jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.9
- 安装匹配
清理并重建JupyterLab
jupyter lab clean jupyter lab build验证安装并重启JupyterLab
运行jupyter labextension list确认扩展版本正确,之后重启JupyterLab即可正常运行tqdm。
内容的提问来源于stack exchange,提问作者Beezley
相关产品推荐
相关产品推荐

