matplotlib / matplotlib/ipympl
JupyterLab - sharing kernels breaks ipympl
还没有人认领这个 Issue。
- 主要语言
- Jupyter Notebook
- 星标
- 1.7k
- 派生
- 234
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Describe the issue
If I have two notebooks open in jupyterlab, with the kernel of the second chosen as the kernel of the first (using jupyterlab gui kernel dropdown menu -> change kernel and making a choice from "use kernel from preferred session" and selecting notebook1.ipynb). If I try and use ipympl in this second notebook I get the "Error displaying widget: model not found" error. But ipympl works perfectly if I select the second (and original) kernel for the second notebook.
I'm doing this kernel sharing because I am using jupyterlab to control my experiment and only once instance of the hardware control code can be loaded. My idea is that my various measurements will be in separate jupyter notebooks but control a single kernel (where the hardware is defined). So far this idea works fine except for ipympl, I can still plot with `%matplotlib inline`.
I have tested this in a fresh conda environment with the latest versions of everything (AFAIK).
## Versions
```
3.9.5 (default, May 18 2021, 14:42:02) [MSC v.1916 64 bit (AMD64)]
ipympl version: 0.7.0
jupyter core : 4.7.1
jupyter-notebook : 6.4.0
qtconsole : 5.0.3
ipython : 7.22.0
ipykernel : 5.3.4
jupyter client : 6.1.12
jupyter lab : 3.0.16
nbconvert : 6.0.7
ipywidgets : 7.6.3
nbformat : 5.1.3
traitlets : 5.0.5
Known nbextensions:
config dir: C:\Users\monnvadmin\anaconda3\envs\control\etc\jupyter\nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: ok
jupyter-js-widgets/extension enabled
- Validating: ok
JupyterLab v3.0.16
C:\Users\monnvadmin\anaconda3\envs\control\share\jupyter\labextensions
jupyter-matplotlib v0.9.0 enabled ok
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)
```
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 JupyterLab 3.0.16 中通过 kernel dropdown 共享 notebook1.ipynb 的 kernel 来重现该问题,然后在第二个 notebook 中使用 ipympl,并观察 widget model error。将其与使用独立 kernel 时正常工作的情况进行比较;当共享 kernel 时 ipympl 能够正确显示且不出现报告的错误,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- jupyter-notebook
- 领域
- backend, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100