我在安装 Jupyterlab 扩展时开始遇到以前从未遇到过的问题。安装 Jupyterlab 的新扩展后,我无法构建。
我正在使用 GCP AI Platform Notebooks 运行 Jupyterlab。我在 Debian 10 上使用标准 Python 3 环境。我尝试在不同类型的机器上运行。
我收到状态 500 错误。这是我运行时的日志jupyter lab build
:
[LabBuildApp] WARNING | Config option `kernel_spec_manager_class` not recognized by `LabBuildApp`.
[LabBuildApp] JupyterLab 1.2.16
[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
An error occured.
PermissionError: [Errno 1] Operation not permitted: '/opt/conda/share/jupyter/lab/staging/index.js'
See the log file for details: /tmp/jupyterlab-debug-pnbu3naq.log
这是包含详细信息的日志文件:
[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v15.3.0
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File "/opt/conda/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield
[LabBuildApp] File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labapp.py", line 98, in start
command=command, app_options=app_options)
[LabBuildApp] File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 459, in build
command=command, clean_staging=clean_staging)
[LabBuildApp] File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 650, in build
clean=clean_staging
[LabBuildApp] File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 1103, in _populate_staging
shutil.copy(pjoin(HERE, 'staging', fname), target)
[LabBuildApp] File "/opt/conda/lib/python3.7/shutil.py", line 249, in copy
copymode(src, dst, follow_symlinks=follow_symlinks)
[LabBuildApp] File "/opt/conda/lib/python3.7/shutil.py", line 144, in copymode
chmod_func(dst, stat.S_IMODE(st.st_mode))
[LabBuildApp] PermissionError: [Errno 1] Operation not permitted: '/opt/conda/share/jupyter/lab/staging/index.js'
[LabBuildApp] Exiting application: JupyterLab
由于我过去能够在其他 VM 实例上安装 Jupyterlab 的相同扩展,因此我希望它与安装的 Jupyterlab 版本有关。不过,我希望 Google 能够安装最新版本的 Jupyterlab。
错误日志似乎确实表明这是一个权限错误,当我运行时我不明白jupyter lab build
在基地。创建实例后我更改的唯一设置是启用扩展。