0

I want to install Temsorboard to Jupyter lab on AWS EC2 but it just doesn't work. I have a similar issue to this post.

The issue that I do not want to open up the firewall as some people recommended, because of security concerns. So that answer is not resolving my situation. And I don't see why it can't do any of this because I can download, install, delete, update any packages in general with anaconda, and overall the firewall doesn't seem to be negatively impacting everywhere else.

Environment

  • EC2 environment
  • Ubuntu 18.04
  • SageMaker instance
  • Anaconda environment

I constantly have this problem that no extension gets installed and works from the extensions. ex.: in the GUI I searched for tensorboard click to install than

Build Recommended
JupyterLab build is suggested:
jupyterlab_tensorboard needs to be included in build

clicked on BUILD

output Build failed with 500, please run 'jupyter lab build' on the server for full output

input: jupyter lab build

OUT:

[LabBuildApp] JupyterLab 1.2.6
[LabBuildApp] Building in /home/ubuntu/anaconda3/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: npm dependencies failed to install
See the log file for details:  /tmp/jupyterlab-debug-lctnnmuf.log

Error message log:

nano /tmp/jupyterlab-debug-f61pajsv.log

output:

[LabBuildApp] Building in /home/ubuntu/anaconda3/share/jupyter/lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v6.13.1

[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node /home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-int$
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error ws@7.2.1: The engine "node" is incompatible with this module. Expected version ">=8.3.0". Got "6.13.1"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

[LabBuildApp] npm dependencies failed to install
[LabBuildApp] Traceback (most recent call last):

[LabBuildApp]   File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_$
    yield

[LabBuildApp]   File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab/labapp.py", line 98, in start
    command=command, app_options=app_options)

[LabBuildApp]   File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 459, in build
    command=command, clean_staging=clean_staging)

[LabBuildApp]   File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 660, in build
    raise RuntimeError(msg)

[LabBuildApp] RuntimeError: npm dependencies failed to install

[LabBuildApp] Exiting application: JupyterLab

IN: sudo jupyter lab build

OUT:

Traceback (most recent call last):
  File "/usr/local/bin/jupyter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 285, in main
    command = _jupyter_abspath(subcommand)
  File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 125, in _jupyter_abspath
    'Jupyter command `{}` not found.'.format(jupyter_subcommand)
Exception: Jupyter command `jupyter-lab` not found.
MLavoie
  • 9,671
  • 41
  • 36
  • 56
sogu
  • 2,738
  • 5
  • 31
  • 90

1 Answers1

0

ANSWER BY https://github.com/jupyterlab/jupyterlab/issues/10358#issuecomment-860080291

Given this message:

error ws@7.2.1: The engine "node" is incompatible with this module. Expected version ">=8.3.0". Got "6.13.1"

and this one:

[LabBuildApp] Node v6.13.1

It looks like you are using a way outdated version of node.js. If you are concerned about security you should upgrade to a supported version of Node. The current LTS release of Node is 14.17.0 (so you are four LTS releases behind - I would be scared to use such a setup) and the latest version is 16.3. I would recommend upgrading to Node 12 (less optimal) or Node 14 (optimal).

When upgrading Node.js you very likely will also need to update JupyterLab which I would recommend anyways as you are running:

[LabBuildApp] JupyterLab 1.2.6

while the the current version of JupyterLab is 3.0.16 (with 3.1 to be released soon); I would highly recommend upgrading to at least the latest 2.x release (or going straight to 3.x series); there were many security fixes since 1.2.6 release.

Please also note that starting with JupyterLab 3.0 many extensions can be installed without requirement of having Node.js at all. I do now know if this is the case for the tensorboard extension - it would be good to check with the authors.

sogu
  • 2,738
  • 5
  • 31
  • 90