Ipywidgets: Jupyter Lab extensions install problem in Ubuntu 16.04

Created on 28 Feb 2018  路  5Comments  路  Source: jupyter-widgets/ipywidgets

I installed node.js.

In terminal, jupyter labextension install @jupyter-widgets/jupyterlab-manager --debug leads to:

Searching ['/home/simoncor', '/home/simoncor/.jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /usr/etc/jupyter
Looking for jupyter_config in /home/simoncor/.jupyter
Looking for jupyter_config in /home/simoncor
Traceback (most recent call last):

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/labextensions.py", line 71, in start
    ans = self.run_task()

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/labextensions.py", line 100, in run_task
    for arg in self.extra_args

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/labextensions.py", line 100, in <listcomp>
    for arg in self.extra_args

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/commands.py", line 210, in install_extension
    return handler.install_extension(extension)

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/commands.py", line 343, in install_extension
    self._ensure_app_dirs()

  File "/usr/local/lib/python3.5/dist-packages/jupyterlab/commands.py", line 995, in _ensure_app_dirs
    os.makedirs(path)

  File "/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)

PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/lab/extensions'


Errored, use --debug for full output:
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/lab/extensions'

Very oddly, when I try implementing sudo to give permissions, it says: sudo: jupyter: command not found
Yet if I type in jupyter, the command is recognized!

resolved-locked

Most helpful comment

I ran into something similar recently. I just had to chown the directory to reset the permissions.

sudo chown -hR {user} {dir}

All 5 comments

Does that directory have permissions for users to write to it?

Here's my guess at what happened. Someone installed jupyterlab using sudo, which created that lab/extension directory with root permissions. However, root doesn't search /usr/local/bin for executables. So sudo won't find jupyter, and normal users can't write to that directory to install extensions.

If that's the issue, you could set up root so that /usr/local/bin is in the path temporarily (security implications there), or you could fix the permissions on that /usr/local/share directory to let users write to it.

Closing as answered. Please post another comment here if you'd like to continue the discussion or to continue diagnosing the issue.

I ran into something similar recently. I just had to chown the directory to reset the permissions.

sudo chown -hR {user} {dir}

I ran into something similar recently. I just had to chown the directory to reset the permissions.

sudo chown -hR {user} {dir}

I try sudo chown -hR {user} anaconda3 and it worked!!!

same issues ,sudo chown -hR {user} anaconda3 work

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AbdealiJK picture AbdealiJK  路  6Comments

fses91 picture fses91  路  6Comments

pleabargain picture pleabargain  路  5Comments

kennethjmyers picture kennethjmyers  路  3Comments

hangyao picture hangyao  路  6Comments