jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.12k stars 3.35k forks source link

Installing extensions only possible via command line #9225

Closed jclsn closed 8 months ago

jclsn commented 3 years ago

Description

When I try to install an extension via the manager, I get Error: 500 (Internal Server Error). When I Install it via sudo jupyter labextension install my-extension, it works without issues. Could it be that the permission are missing in Jupyter Lab? Tried starting it with root, but got a notificationt that it is not supposed to.

Context

Troubleshoot Output
$PATH:
        /home/user/.local/bin
        /opt/miniconda3/condabin
        /usr/local/sbin
        /usr/local/bin
        /usr/bin
        /var/lib/flatpak/exports/bin
        /usr/lib/jvm/default/bin
        /usr/bin/site_perl
        /usr/bin/vendor_perl
        /usr/bin/core_perl
        /var/lib/snapd/snap/bin

sys.path:
        /usr/bin
        /usr/lib/python38.zip
        /usr/lib/python3.8
        /usr/lib/python3.8/lib-dynload
        /home/jan/.local/lib/python3.8/site-packages
        /usr/lib/python3.8/site-packages

sys.executable:
        /usr/bin/python3

sys.version:
        3.8.6 (default, Sep 30 2020, 04:00:38) 
        [GCC 10.2.0]

platform.platform():
        Linux-5.9.1-3-MANJARO-x86_64-with-glibc2.2.5

which -a jupyter:
        /usr/bin/jupyter

pip list:
        Package                  Version
        ------------------------ ------------------------
        airdrop-ng               1.1
        airgraph-ng              1.1
        apparmor                 3.0.0
        appdirs                  1.4.4
        apsw                     3.33.0.post1
        argh                     0.26.2
        argon2-cffi              20.1.0
        attrs                    20.2.0
        backcall                 0.2.0
        beautifulsoup4           4.9.3
        bleach                   3.2.1
        btrfsutil                1.2.0
        CacheControl             0.12.6
        ceph-volume              1.0.0
        cephfs                   2.0.0
        cephfs-shell             0.0.1
        certifi                  2020.6.20
        cffi                     1.14.3
        chardet                  3.0.4
        Click                    7.0
        colorama                 0.4.4
        configobj                5.0.6
        contextlib2              0.6.0.post1
        css-parser               1.0.4
        cssselect                1.1.0
        cupshelpers              1.0
        cycler                   0.10.0
        decorator                4.4.2
        defusedxml               0.6.0
        distlib                  0.3.1
        distro                   1.5.0
        dnspython                2.0.0
        docopt                   0.6.2
        entrypoints              0.3
        evdev                    1.3.0
        feedparser               5.2.1
        google-api-python-client 1.6.2
        html2text                2020.1.16
        html5-parser             0.4.9
        html5lib                 1.1
        idna                     2.10
        ifaddr                   0.1.7
        importlib-metadata       2.0.0
        ipykernel                5.3.4
        ipython                  7.18.1
        ipython-genutils         0.1.0
        ipywidgets               7.5.1
        isc                      2.0
        jedi                     0.17.2
        Jinja2                   2.11.2
        json5                    0.9.5
        jsonschema               3.2.0
        jupyter-client           6.1.7
        jupyter-console          6.2.0
        jupyter-core             4.6.3
        jupyterlab               2.2.9
        jupyterlab-server        1.2.0
        kazam                    1.4.5
        keyutils                 0.6
        kiwisolver               1.2.0
        lensfun                  0.3.95
        LibAppArmor              3.0.0
        louis                    3.15.0
        lutris                   0.5.7.1
        lxml                     4.5.2
        Markdown                 3.3
        MarkupSafe               1.1.1
        matplotlib               3.3.1
        mechanize                0.4.5
        mistune                  0.8.4
        msgpack                  1.0.0
        nbconvert                5.6.1
        nbformat                 5.0.6
        neovim                   0.3.1
        netifaces                0.10.9
        nodejs                   0.1.1
        notebook                 6.1.4
        npyscreen                4.10.5
        numpy                    1.19.1
        oauth2client             4.1.3
        optional-django          0.1.0
        ordered-set              4.0.2
        ordereddict              1.1
        packaging                20.4
        pacman-mirrors           4.16.4
        pandocfilters            1.4.2
        parso                    0.7.1
        pathlib2                 2.3.3
        pathtools                0.1.2
        peewee                   3.13.3
        pep517                   0.8.2
        pexpect                  4.8.0
        pickleshare              0.7.5
        picoscope                0.7.11
        PicoSDK                  1.0
        Pillow                   7.2.0
        pip                      20.1.1
        ply                      3.11
        progress                 1.5
        prometheus-client        0.8.0
        prompt-toolkit           3.0.8
        psutil                   5.7.2
        ptyprocess               0.6.0
        pwquality                1.4.4
        pycairo                  1.20.0
        pychm                    0.8.6
        pycparser                2.20
        pycups                   2.0.1
        pycurl                   7.43.0.6
        Pygments                 2.7.2
        PyGObject                3.38.0
        pyparsing                2.4.7
        Pypubsub                 4.0.3
        PyQt5                    5.15.1
        PyQt5-sip                12.8.1
        PyQtWebEngine            5.15.1
        pyrsistent               0.17.3
        pyserial                 3.4
        pysmbc                   1.0.20
        python-dateutil          2.8.1
        python-distutils-extra   2.39
        pyudev                   0.22.0.dev20200622
        pyxdg                    0.26
        PyYAML                   5.3.1
        pyzmq                    19.0.1
        rados                    2.0.0
        rbd                      2.0.0
        regex                    2020.10.15
        reportlab                3.5.53
        requests                 2.24.0
        resolvelib               0.4.0
        retrying                 1.3.3
        rgw                      2.0.0
        scapy                    git-archive.dev304758016
        scipy                    1.5.3
        selinux                  3.1
        Send2Trash               1.5.0
        sentry-sdk               0.14.1
        setuptools               50.3.2
        six                      1.15.0
        solaar                   1.0.4
        soupsieve                2.0.1
        spotify-dl               4.0.0
        spotipy                  2.3.8
        team                     1.0
        terminado                0.9.1
        testpath                 0.4.4
        toml                     0.10.1
        tornado                  6.0.4
        traitlets                4.3.3
        udiskie                  2.2.0
        unrardll                 0.1.4
        urllib3                  1.25.10
        vim                      0.0.1
        watchdog                 0.10.3
        wcwidth                  0.2.5
        webencodings             0.5.1
        wheel                    0.35.1
        widgetsnbextension       3.5.1
        youtube-dl               2020.9.20
        zeroconf                 0.28.6
        zipp                     3.3.2

conda list:
        # packages in environment at /opt/miniconda3:
        #
        # Name                    Version                   Build  Channel
        _libgcc_mutex             0.1                        main  
        ca-certificates           2020.1.1                      0  
        certifi                   2020.4.5.1               py38_0  
        cffi                      1.14.0           py38he30daa8_1  
        chardet                   3.0.4                 py38_1003  
        conda                     4.8.3                    py38_0  
        conda-package-handling    1.6.1            py38h7b6447c_0  
        cryptography              2.9.2            py38h1ba5d50_0  
        idna                      2.9                        py_1  
        ld_impl_linux-64          2.33.1               h53a641e_7  
        libedit                   3.1.20181209         hc058e9b_0  
        libffi                    3.3                  he6710b0_1  
        libgcc-ng                 9.1.0                hdf63c60_0  
        libstdcxx-ng              9.1.0                hdf63c60_0  
        ncurses                   6.2                  he6710b0_1  
        openssl                   1.1.1g               h7b6447c_0  
        pip                       20.0.2                   py38_3  
        pycosat                   0.6.3            py38h7b6447c_1  
        pycparser                 2.20                       py_0  
        pyopenssl                 19.1.0                   py38_0  
        pysocks                   1.7.1                    py38_0  
        python                    3.8.3                hcff3b4d_0  
        readline                  8.0                  h7b6447c_0  
        requests                  2.23.0                   py38_0  
        ruamel_yaml               0.15.87          py38h7b6447c_0  
        setuptools                46.4.0                   py38_0  
        six                       1.14.0                   py38_0  
        sqlite                    3.31.1               h62c20be_1  
        tk                        8.6.8                hbc83047_0  
        tqdm                      4.46.0                     py_0  
        urllib3                   1.25.8                   py38_0  
        wheel                     0.34.2                   py38_0  
        xz                        5.2.5                h7b6447c_0  
        yaml                      0.1.7                had09818_2  
        zlib                      1.2.11               h7b6447c_3
Command Line Output
[W 21:33:34.764 LabApp] 500 POST /lab/api/extensions?1603658013116 (::1): [Errno 13] Permission denied: '/usr/share/jupyter/lab/extensions/jupyterlab-latex-2.0.1.tgz'
[W 21:33:34.765 LabApp] [Errno 13] Permission denied: '/usr/share/jupyter/lab/extensions/jupyterlab-latex-2.0.1.tgz'
[E 21:33:34.766 LabApp] {
      "Host": "localhost:8888",
      "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0",
      "Accept": "*/*",
      "Accept-Language": "de,en-US;q=0.7,en;q=0.3",
      "Accept-Encoding": "gzip, deflate",
      "Referer": "http://localhost:8888/lab",
      "Content-Type": "text/plain;charset=UTF-8",
      "X-Xsrftoken": "2|cde4e9c4|53389fcd673c026dbb28f4f4c0e60753|1603391558",
      "Origin": "http://localhost:8888",
      "Content-Length": "54",
      "Connection": "keep-alive",
      "Cookie": "_xsrf=2|cde4e9c4|53389fcd673c026dbb28f4f4c0e60753|1603391558; username-localhost-8889=\"2|1:0|10:1603392299|23:username-localhost-8889|44:MDVkNDY1MGJjMjg2NDk4YmEzNmY2MmVjMTk3NjQ3NTc=|621fd545c2bfd67f958e0ac0910cf03732ffc8874dddb2d3ed9cdc981e30a6ca\"; username-localhost-8888=\"2|1:0|10:1603393390|23:username-localhost-8888|44:OWNiNDMxYjg4YWVjNGU4MWJjNTU0ZTM2ZGFmMmIyYjc=|7b5e93894c9091ea11bb53b677e9248afd6c3a2df3ab601669002aedf0e9ab26\"",
      "Pragma": "no-cache",
      "Cache-Control": "no-cache"
    }
[E 21:33:34.766 LabApp] 500 POST /lab/api/extensions?1603658013116 (::1) 1639.49ms referer=http://localhost:8888/lab

wta2001 commented 2 years ago

Manjaro user with the same issue. Thanks for mentioning the permission issues. I changed the permission of the jupyter directory to read and write allowed by anyone. It works, and the extensions can now be installed in jupyterlab.