python - Jupyter-matplotlib:显示小部件时出错:找不到模型
问题描述
我正在尝试安装 jupyter-matplotlib 扩展,但无法使其在 jupyterlab 实例中工作。按照此处的步骤安装后:
https
://github.com/matplotlib/jupyter-matplotlib
执行一个简单示例时出现
错误:显示小部件时出错:找不到模型
这是我$ 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
解决方案
解决了!结果 ipywidget 7.5 破坏了 jupyter lab,它也影响了其他库。
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
推荐阅读
- php - 使用 php 函数附加字符串
- python - 枚举纸浆包中 LP 模型中的约束
- kubernetes - 在 Kubernetes 的环境变量中解析服务 IP
- php - 码头工人 [ nginx | php | mysql] 响应时间很长
- javascript - 有没有一种方法可以更新 postgres 和节点 js 中的用户配置文件(详细信息),但每次都必须发送请求正文中的所有参数?
- vue.js - 带有动态数据的 Vue JS 组件中的 jQuery UI 可拖放和可拖放
- javascript - 如何在 mongoose.connect() 中传递选项
- javascript - Ajax - json,无法创建表
- javascript - 为什么我在尝试从 nasa 加载当天的图片时总是收到 404 错误?
- rust - Cargo.toml 中的 [dependencies] 和 [dependencies.dependency-name] 有什么区别?