安装 plotly 扩展后 Jupyter 实验室构建失败
Jupyter lab build fail after installing plotly extension
jupyterlab 中没有 rendered/displayed 情节图。因此,我尝试安装扩展 jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyterlab-plotly。之后,我被要求 运行 jupyter 实验室构建,但失败了。我不知道问题出在哪里。
安装信息:
我用pyenv安装了一个venv 运行ning python 3.8.5.
jupyter --version
木星核心:4.7.1
jupyter-笔记本:6.4.0
qtconsole:未安装
ipython:7.25.0
内核:6.0.3
jupyter 客户端:6.1.12
木星实验室:3.0.12
nbconvert:6.1.0
ipywidgets:7.6.3
nb格式:5.1.3
特征:5.0.5
npm --version
7.11.2
节点--版本
v16.1.0
由于公司要求,我只能使用 WSL1。
我将 post 在
的命令输出下方
- jupyter labextension 列表
- jupyter 实验室构建
- cat /tmp/jupyterlab-debug-5vr2zquq.log
- jupyter labextension 安装@jupyter-widgets/jupyterlab-manager --minimize=False
如有任何建议,我们将不胜感激。我不知道如何解决这个问题。
谢谢
❯ jupyter labextension list
JupyterLab v3.0.16
/home/bebop/.local/share/jupyter/labextensions
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
/mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/labextensions
jupyterlab-plotly v5.1.0 enabled OK
Other labextensions (built into JupyterLab)
app dir: /mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/lab
plotlywidget v4.14.3 enabled OK
Build recommended, please run jupyter lab build:
plotlywidget needs to be included in build
❯ jupyter lab build
[LabBuildApp] JupyterLab 3.0.16
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (production, minimized)
Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the dev_build and/or minimize options.
If you are building via the jupyter lab build command, you can disable
these options like so:
jupyter lab build --dev-build=False --minimize=False
You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named jupyter_config.py:
c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False
If you don’t already have a jupyter_config.py file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:
jupyter --paths
Explanation:
dev-build: This option controls whether a dev or a more streamlined
production build is used. This option will default to False (i.e., the
production build) for most users. However, if you have any labextensions
installed from local files, this option will instead default to True.
Explicitly setting dev-build to False will ensure that the production
build is used in all circumstances.
minimize: This option controls whether your JS bundle is minified
during the Webpack build, which helps to improve JupyterLab’s overall
performance. However, the minifier plugin used by Webpack is very memory
intensive, so turning it off may help the build finish successfully in
low-memory environments.
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
See the log file for details: /tmp/jupyterlab-debug-5vr2zquq.log
❯ cat /tmp/jupyterlab-debug-5vr2zquq.log
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Node v16.1.0
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/debuglog.py”, line 47, in debug_logging
yield
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 166, in start
raise e
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 162, in start
build(name=self.name, version=self.version,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 469, in build
return handler.build(name=name, version=version, static_url=static_url,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 657, in build
self._populate_staging(
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 1180, in _populate_staging
shutil.copytree(pjoin(HERE, ‘staging’, ‘templates’), templates)
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 554, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 510, in _copytree
raise Error(errors)
[LabBuildApp] shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privatpath/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
[LabBuildApp] Exiting application: JupyterLab
❯ jupyter labextension install @jupyter-widgets/jupyterlab-manager --minimize=False
Building jupyterlab assets (production, not minimized)
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
您不需要从源安装扩展。 JupyterLab 3.0 引入了预构建的扩展系统,允许用户从 pip(和 conda)安装扩展,而无需构建步骤,从而消除了对失败构建进行故障排除的所有麻烦。您似乎使用了一套旧的说明来安装 plotly,因为 plotly 5.0+ 支持 JupyterLab 的预构建扩展。首先卸载刚刚安装的源扩展(不需要这些):
jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager jupyterlab-plotly plotlywidget
可选:验证扩展名列表:
jupyter labextension list
然后使用 pip 或 conda 安装新的 plotly 版本:
pip install "plotly>=5" "ipywidgets>=7.6"
# or, if using conda:
# conda install -c conda "plotly>=5"
# conda install "ipywidgets>=7.6"
小部件和渲染器都包含在内,因此无需单独安装plotlywidget
。
再次检查扩展列表:
jupyter labextension list
您现在应该看到以下行:
jupyterlab-plotly v5.1.0 enabled OK
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
(当然以后版本可能会更新)
jupyterlab 中没有 rendered/displayed 情节图。因此,我尝试安装扩展 jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyterlab-plotly。之后,我被要求 运行 jupyter 实验室构建,但失败了。我不知道问题出在哪里。
安装信息: 我用pyenv安装了一个venv 运行ning python 3.8.5.
jupyter --version 木星核心:4.7.1 jupyter-笔记本:6.4.0 qtconsole:未安装 ipython:7.25.0 内核:6.0.3 jupyter 客户端:6.1.12 木星实验室:3.0.12 nbconvert:6.1.0 ipywidgets:7.6.3 nb格式:5.1.3 特征:5.0.5
npm --version 7.11.2
节点--版本 v16.1.0
由于公司要求,我只能使用 WSL1。
我将 post 在
的命令输出下方- jupyter labextension 列表
- jupyter 实验室构建
- cat /tmp/jupyterlab-debug-5vr2zquq.log
- jupyter labextension 安装@jupyter-widgets/jupyterlab-manager --minimize=False
如有任何建议,我们将不胜感激。我不知道如何解决这个问题。 谢谢
❯ jupyter labextension list
JupyterLab v3.0.16
/home/bebop/.local/share/jupyter/labextensions
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
/mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/labextensions
jupyterlab-plotly v5.1.0 enabled OK
Other labextensions (built into JupyterLab)
app dir: /mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/lab
plotlywidget v4.14.3 enabled OK
Build recommended, please run jupyter lab build:
plotlywidget needs to be included in build
❯ jupyter lab build
[LabBuildApp] JupyterLab 3.0.16
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (production, minimized)
Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the dev_build and/or minimize options.
If you are building via the jupyter lab build command, you can disable
these options like so:
jupyter lab build --dev-build=False --minimize=False
You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named jupyter_config.py:
c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False
If you don’t already have a jupyter_config.py file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:
jupyter --paths
Explanation:
dev-build: This option controls whether a dev or a more streamlined
production build is used. This option will default to False (i.e., the
production build) for most users. However, if you have any labextensions
installed from local files, this option will instead default to True.
Explicitly setting dev-build to False will ensure that the production
build is used in all circumstances.
minimize: This option controls whether your JS bundle is minified
during the Webpack build, which helps to improve JupyterLab’s overall
performance. However, the minifier plugin used by Webpack is very memory
intensive, so turning it off may help the build finish successfully in
low-memory environments.
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
See the log file for details: /tmp/jupyterlab-debug-5vr2zquq.log
❯ cat /tmp/jupyterlab-debug-5vr2zquq.log
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Node v16.1.0
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/debuglog.py”, line 47, in debug_logging
yield
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 166, in start
raise e
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 162, in start
build(name=self.name, version=self.version,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 469, in build
return handler.build(name=name, version=version, static_url=static_url,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 657, in build
self._populate_staging(
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 1180, in _populate_staging
shutil.copytree(pjoin(HERE, ‘staging’, ‘templates’), templates)
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 554, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 510, in _copytree
raise Error(errors)
[LabBuildApp] shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privatpath/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
[LabBuildApp] Exiting application: JupyterLab
❯ jupyter labextension install @jupyter-widgets/jupyterlab-manager --minimize=False
Building jupyterlab assets (production, not minimized)
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
您不需要从源安装扩展。 JupyterLab 3.0 引入了预构建的扩展系统,允许用户从 pip(和 conda)安装扩展,而无需构建步骤,从而消除了对失败构建进行故障排除的所有麻烦。您似乎使用了一套旧的说明来安装 plotly,因为 plotly 5.0+ 支持 JupyterLab 的预构建扩展。首先卸载刚刚安装的源扩展(不需要这些):
jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager jupyterlab-plotly plotlywidget
可选:验证扩展名列表:
jupyter labextension list
然后使用 pip 或 conda 安装新的 plotly 版本:
pip install "plotly>=5" "ipywidgets>=7.6"
# or, if using conda:
# conda install -c conda "plotly>=5"
# conda install "ipywidgets>=7.6"
小部件和渲染器都包含在内,因此无需单独安装plotlywidget
。
再次检查扩展列表:
jupyter labextension list
您现在应该看到以下行:
jupyterlab-plotly v5.1.0 enabled OK
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
(当然以后版本可能会更新)