ipywidgets 的 JupyterLab 扩展的目的到底是什么?
What exactly is the purpose of the JupyterLab extension of ipywidgets?
据此:https://ipywidgets.readthedocs.io/en/stable/user_install.html,为了在旧版 Jupyter Notebook 上使用 ipywidgets,必须像这样安装适当的 Jupyter Notebook 扩展:
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
此外,为了从通过 JupyterLab 运行的笔记本中使用 ipywidgets,一种方法是使用以下方法安装 ipywidgets 的 JupyterLab 扩展:
jupyter labextension install @jupyter-widgets/jupyterlab-manager
为什么会这样?我的印象是 JupyterLab 的 Notebook 只是作为 JupyterLab 的扩展打包的遗留 Jupyter Notebook。我试图通读 ipywidgets JupyterLab 扩展的代码,但我不确定发生了什么。
如果有人能列出最重要的原因,说明为什么在通过 JupyterLab 运行 Notebooks 时仅安装 ipywidgets 的 Jupyter Notebook 扩展是不够的,我将不胜感激。
提前致谢。
所以我猜 运行 nbextension 或 labextension 脚本的目的是添加一些新的 CSS 和 Javascript 库;大概路径等对于 jupyterlab 和 vanilla jupyter 是不同的;我认为没有任何理由期望 nbextensions 会与 jupyter lab 共享。
据此:https://ipywidgets.readthedocs.io/en/stable/user_install.html,为了在旧版 Jupyter Notebook 上使用 ipywidgets,必须像这样安装适当的 Jupyter Notebook 扩展:
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
此外,为了从通过 JupyterLab 运行的笔记本中使用 ipywidgets,一种方法是使用以下方法安装 ipywidgets 的 JupyterLab 扩展:
jupyter labextension install @jupyter-widgets/jupyterlab-manager
为什么会这样?我的印象是 JupyterLab 的 Notebook 只是作为 JupyterLab 的扩展打包的遗留 Jupyter Notebook。我试图通读 ipywidgets JupyterLab 扩展的代码,但我不确定发生了什么。
如果有人能列出最重要的原因,说明为什么在通过 JupyterLab 运行 Notebooks 时仅安装 ipywidgets 的 Jupyter Notebook 扩展是不够的,我将不胜感激。
提前致谢。
所以我猜 运行 nbextension 或 labextension 脚本的目的是添加一些新的 CSS 和 Javascript 库;大概路径等对于 jupyterlab 和 vanilla jupyter 是不同的;我认为没有任何理由期望 nbextensions 会与 jupyter lab 共享。