Jupyter-matplotlib:显示窗口小部件时出错:找不到模型

时间:2019-07-14 15:37:41

标签: python matplotlib jupyter

我正在尝试安装jupyter-matplotlib扩展,但无法使其在jupyterlab实例中运行。 按照以下步骤安装后:
https://github.com/matplotlib/jupyter-matplotlib
执行一个简单示例时出现错误:
显示小部件时出错:找不到模型
screen capture of described behaviour

这是我的$ conda list的相关包的输出:

ipykernel 5.1.1
ipympl 0.2.1
ipython 7.6.1
ipython_genutils 0.2.0
ipywidgets 7.5.0
jupyter_client 5.3.1
jupyter_core 4.4.0
jupyterlab 1.0.2
jupyterlab_server 1.0.0

谢谢!

1 个答案:

答案 0 :(得分:1)

解决了! 原来ipywidget 7.5打破了jupyter实验室,并且也影响了其他库。

https://github.com/plotly/plotly.py/issues/1659

降级到7为我解决了这个问题(尽管7 wrt 7.5应该是向后兼容的!)

还要确保将ipympl 0.2.1与jupyter-matplotlib 0.3.0 labextension匹配。 jupyter labextension install jupyter-matplotlib@0.3.0