Jupyter小部件未出现在笔记本中

丹尼尔·扎帕塔(Daniel Zapata)

我正在运行jupyter笔记本,但是jupyter小部件没有出现。相反,我收到以下消息:

Failed to display Jupyter Widget of type Button.
If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean that the widgets JavaScript is still loading. If this message persists, it likely means that the widgets JavaScript library is either not installed or not enabled. See the Jupyter Widgets Documentation for setup instructions.
If you're reading this message in another frontend (for example, a static rendering on GitHub or NBViewer), it may mean that your frontend doesn't currently support widgets.

我有以下版本:

widgetsnbextension (3.0.8)
ipywidgets (7.0.5)

我使用以下命令安装了小部件:

pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension

我的代码也是:

import ipywidgets as widgets
from IPython.display import display

button = widgets.Button(description='Hello')
display(button)
另一个

我有相同的版本,并且代码形式也形成了我。在启动jupyter笔记本之前。您尝试执行吗?:

jupyter nbextension enable --py widgetsnbextension --sys-prefix

输出==>

Enabling notebook extension jupyter-js-widgets/extension...
         - Validating: ok

** http://ipywidgets.readthedocs.io/en/stable/user_install.html显示了pip的安装说明。指定在使用虚拟环境时使用此模式。在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章