jupyterlab / jupyterlab

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

Node.js and npm unrecognized by Jupyterlab when installing certain add-ons #8906

Open SandboChang opened 4 years ago

SandboChang commented 4 years ago

When trying to install the extension (@jupyterlab/toc-extension), it threw an error message:

An error occured. ValueError: Please install Node.js and npm before continuing installation. You may be able to install Node.js from your package manager, from conda, or directly from the Node.js website (https://nodejs.org). See the log file for details: /tmp/jupyterlab-debug-xrivgymw.log

To reproduce: -Install ubuntu server -Install Jupyter notebook and JupyterLab via pip3 -Install nodejs and npm from pip3 -On the web interface, try to install the above add-on -The above error is thrown -Also failed when installing this add-on: @jupyterlab/latex

Basically a lot of add-ons cannot be installed.

`$PATH: /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games

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

sys.executable: /usr/bin/python3

sys.version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]

platform.platform(): Linux-5.4.0-42-generic-x86_64-with-glibc2.29

which -a jupyter: /usr/local/bin/jupyter

pip list: Package Version


absl-py                           0.10.0              
argon2-cffi                       20.1.0              
astunparse                        1.6.3               
attrs                             19.3.0              
Automat                           0.8.0               
backcall                          0.2.0               
bleach                            3.1.5               
blinker                           1.4                 
cachetools                        4.1.1               
certifi                           2020.6.20           
cffi                              1.14.2              
chardet                           3.0.4               
Click                             7.0                 
cloud-init                        20.2                
colorama                          0.4.3               
command-not-found                 0.3                 
configobj                         5.0.6               
constantly                        15.1.0              
cryptography                      2.8                 
cycler                            0.10.0              
Cython                            0.29.21             
dbus-python                       1.2.16              
decorator                         4.4.2               
defusedxml                        0.6.0               
distro                            1.4.0               
distro-info                       0.23ubuntu1         
entrypoints                       0.3                 
future                            0.18.2              
gast                              0.3.3               
google-auth                       1.20.1              
google-auth-oauthlib              0.4.1               
google-pasta                      0.2.0               
grpcio                            1.31.0              
h5py                              2.10.0              
httplib2                          0.14.0              
hyperlink                         19.0.0              
idna                              2.8                 
importlib-metadata                1.5.0               
incremental                       16.10.1             
ipykernel                         5.3.4               
ipython                           7.17.0              
ipython-genutils                  0.2.0               
ipywidgets                        7.5.1               
jedi                              0.17.2              
Jinja2                            2.10.1              
json5                             0.9.5               
jsonpatch                         1.22                
jsonpointer                       2.0                 
jsonschema                        3.2.0               
jupyter-client                    6.1.6               
jupyter-contrib-core              0.3.3               
jupyter-contrib-nbextensions      0.5.1               
jupyter-core                      4.6.3               
jupyter-highlight-selected-word   0.2.0               
jupyter-latex-envs                1.4.6               
jupyter-nbextensions-configurator 0.4.1               
jupyterlab                        2.2.5               
jupyterlab-server                 1.2.0               
Keras-Preprocessing               1.1.2               
keyring                           18.0.1              
kiwisolver                        1.2.0               
language-selector                 0.1                 
launchpadlib                      1.10.13             
lazr.restfulclient                0.14.2              
lazr.uri                          1.0.3               
lxml                              4.5.2               
Markdown                          3.2.2               
MarkupSafe                        1.1.0               
matplotlib                        3.3.1               
mistune                           0.8.4               
more-itertools                    4.2.0               
mplcursors                        0.3                 
nbconvert                         5.6.1               
nbformat                          5.0.7               
netifaces                         0.10.4              
nodejs                            0.1.1               
notebook                          6.1.3               
npm                               0.1.1               
numpy                             1.19.1              
oauthlib                          3.1.0               
odict                             1.7.0               
opt-einsum                        3.3.0               
optional-django                   0.1.0               
packaging                         20.4                
pandocfilters                     1.4.2               
parso                             0.7.1               
pexpect                           4.8.0               
pickleshare                       0.7.5               
Pillow                            7.2.0               
pip                               20.0.2              
plumber                           1.6                 
prometheus-client                 0.8.0               
prompt-toolkit                    3.0.6               
protobuf                          3.13.0              
ptyprocess                        0.6.0               
pyasn1                            0.4.2               
pyasn1-modules                    0.2.1               
pycparser                         2.20                
Pygments                          2.6.1               
PyGObject                         3.36.0              
PyHamcrest                        1.9.0               
PyJWT                             1.7.1               
pymacaroons                       0.13.0              
PyNaCl                            1.3.0               
pyOpenSSL                         19.0.0              
pyparsing                         2.4.7               
pyrsistent                        0.15.5              
pyserial                          3.4                 
python-apt                        2.0.0+ubuntu0.20.4.1
python-dateutil                   2.8.1               
python-debian                     0.1.36ubuntu1       
PyYAML                            5.3.1               
pyzmq                             19.0.2              
qutip                             4.5.2               
requests                          2.22.0              
requests-oauthlib                 1.3.0               
requests-unixsocket               0.2.0               
rsa                               4.6                 
schemdraw                         0.8                 
scikit-rf                         0.15.3              
scipy                             1.4.1               
SecretStorage                     2.3.1               
Send2Trash                        1.5.0               
service-identity                  18.1.0              
setuptools                        45.2.0              
simplejson                        3.16.0              
six                               1.14.0              
ssh-import-id                     5.10                
systemd-python                    234                 
tensorboard                       2.2.2               
tensorboard-plugin-wit            1.7.0               
tensorflow-estimator              2.2.0               
tensorflow-rocm                   2.2.0               
termcolor                         1.1.0               
terminado                         0.8.3               
testpath                          0.4.4               
tornado                           6.0.4               
traitlets                         4.3.3               
Twisted                           18.9.0              
ubuntu-advantage-tools            20.3                
ufw                               0.36                
unattended-upgrades               0.1                 
urllib3                           1.25.8              
wadllib                           1.3.3               
wcwidth                           0.2.5               
webencodings                      0.5.1               
Werkzeug                          1.0.1               
wheel                             0.34.2              
widgetsnbextension                3.5.1               
wrapt                             1.12.1              
zipp                              1.0.0               
zope.component                    4.6.2               
zope.deferredimport               4.3.1               
zope.deprecation                  4.4.0               
zope.event                        4.4                 
zope.hookable                     5.0.1               
zope.interface                    4.7.1               
zope.lifecycleevent               4.3                 
zope.proxy                        4.3.5

` Any idea will be appreciated.

SandboChang commented 4 years ago

Solved by following the installation of nodejs on this page: https://github.com/nodesource/distributions/blob/master/README.md#debinstall

Turns out pip3 did not install the required version. After install the version 14 for ubuntu under "current", the extensions can now be installed.

SandboChang commented 4 years ago

Unfortunately, what I thought was working only turns out to be an indefinite wait. Installing the extension now gets the terminal to be stuck on

[LabBuildApp] Building jupyterlab assets (build:prod)