我在新 PC 上复制 Jupyter Lab 安装时遇到问题。它在我的前一个上工作得很好。
我无法显示简单的小部件(例如 ipywidgets 或 ipyvuetify 中的复选框)。
我检查了 jupyter-widgets 是否已通过 jupyter labextension list 启用。结果是:
jupyter-vue v1.7.0 enabled ok
jupyter-vuetify v1.8.4 enabled ok
@jupyter-widgets/jupyterlab-manager v5.0.2 enabled ok (python, jupyterlab_widgets)
在笔记本中,当我尝试显示小部件时,单元格显示 Javascript 错误:
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'CheckboxModel' from module '@jupyter-widgets/controls'
Error: Module @jupyter-widgets/controls, version ^1.5.0 is not registered, however,
2.0.0 is
at f.loadClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:74976)
at f.loadModelClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:10721)
at f._make_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:7517)
at f.new_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:5137)
at f.handle_comm_open (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:3894)
at _handleCommOpen (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-
manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:73392)
at b._handleCommOpen (http://localhost:8888/static/lab/jlab_core.86360d749a1ef5f29afb.js?
v=86360d749a1ef5f29afb:2:924842)
at async b._handleMessage
(http://localhost:8888/static/lab/jlab_core.86360d749a1ef5f29afb.js?
v=86360d749a1ef5f29afb:2:926832)
该错误与最近在一份问题报告中提到了这一点 https://github.com/jupyterlab/jupyterlab/issues/12977#issuecomment-1221309124。建议更改为 ipywidgets 版本 7.7.2 或 7.6.5 来解决此问题。另请参阅注释here https://github.com/jupyter-widgets/ipywidgets/issues/3558#issuecomment-1221309944, too.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)