Jupyter lab build fails on windows subsystem linux with errno 13 Permission denied

I am trying to to run the jupyter lab build without success. I installed a venv with pyenv running python 3.8.5.

I’ll post below the command outputs for

jupyter labextension list
jupyter lab build
cat /tmp/jupyterlab-debug-5vr2zquq.log
jupyter labextension install @jupyter-widgets/jupyterlab-manager --minimize=False

Any advice would be appreciated. I have no idea how to fix this.

jupyter labextension list
JupyterLab v3.0.16
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

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


  • 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

[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

[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’”)]

Hey are you running the command as root in WSL? If so, npm v6 refuses to do this by default and change the uid of the user running the npm command.


Hi fcollonval,

that’s a good point you are making. I don’t use sudo to install anything.