【发布时间】:2022-06-11 01:49:15
【问题描述】:
我一直使用以下工作流程来全面更新我的 Jupyter Lab 工作环境:
$ rmvirtualenv my_env
$ mkvirtualenv --python=`which python` my_env
[my_env] $ pip install -r requirements.txt
[my_env] $ jupyter lab build
[my_env] $ jupyter lab
然而,最近,在这些步骤之后:
- 我的小部件全部失效。我可以操作和与他们互动,但他们控制的数字根本没有改变。
- 所有小部件控件都从它们控制的图形上方移动到其下方。
最近未以这种方式更新的虚拟环境中的项目继续正常工作,并且可靠地更新它们会使它们停止工作。
这种情况始终如一(我现在已经破坏了六个确认该模式的项目),甚至对于托管在我本地计算机之外的笔记本(例如this one hosted on Binder)也是如此。当不涉及 ipympl 时,控制小部件本身似乎工作正常(例如,在笔记本 like this one 中)。我还确认观察到的行为独立于浏览器和本地机器(至少 macOS 与 iOS)。
最近是否有关于 Jupyter Lab、ipywidgets 或 ipympl 的更改可能导致此问题?
典型的更新后(非工作)配置:
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.4.0
ipykernel : 6.13.1
ipywidgets : 7.7.0
jupyter_client : 7.3.4
jupyter_core : 4.10.0
jupyter_server : 1.17.1
jupyterlab : 3.4.3
nbclient : 0.6.4
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : not installed
traitlets : 5.2.2
$ jupyter labextension list
JupyterLab v3.4.3
/Users/Rax/Documents/Projects/Coding/Python/venvs/picollisions/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
nbdime-jupyterlab v2.1.1 enabled OK
jupyter-matplotlib v0.11.1 enabled OK
@jupyterlab/git v0.37.1 enabled OK (python, jupyterlab-git)
@jupyter-widgets/jupyterlab-manager v3.1.0 enabled OK (python, jupyterlab_widgets)
@kiteco/jupyterlab-kite v2.0.2 enabled OK (python, jupyterlab_kite)
Other labextensions (built into JupyterLab)
app dir: /Users/Rax/Documents/Projects/Coding/Python/venvs/picollisions/share/jupyter/lab
典型的预更新(工作)配置:
$ jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.4.3
qtconsole : not installed
ipython : 7.26.0
ipykernel : 6.2.0
jupyter client : 6.1.12
jupyter lab : 3.1.10
nbconvert : 6.1.0
ipywidgets : 7.6.4
nbformat : 5.1.3
traitlets : 5.0.5
jupyter labextension list
JupyterLab v3.1.10
/Users/Rax/Documents/Projects/Coding/Python/venvs/picollisions/share/jupyter/labextensions
nbdime-jupyterlab v2.1.0 enabled OK
jupyter-matplotlib v0.9.0 enabled OK
@jupyterlab/git v0.32.2 enabled OK (python, jupyterlab-git)
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
@kiteco/jupyterlab-kite v2.0.2 enabled OK (python, jupyterlab_kite)
/usr/local/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
Other labextensions (built into JupyterLab)
app dir: /Users/Rax/Documents/Projects/Coding/Python/venvs/picollisions/share/jupyter/lab
典型要求:
#...
ipywidgets
ipympl
jupyterlab >=3.1
jupyterlab-git
jupyterlab-kite >=2.0.2
(我尝试省略 Kite 以查看是否是罪魁祸首。无论如何,它在 Binder 版本中不存在。)
【问题讨论】:
-
@Wayne 恐怕这根本不是我的经验(在第一原则上也不正确)。无论如何,这些线程的答案将在这里起作用,因此请随时提供,我会接受。
标签: matplotlib jupyter-lab ipywidgets ipympl