You are not logged in.

#1 2019-01-31 16:52:28

miomio
Member
Registered: 2016-01-17
Posts: 167

[SOLVED] JupyterLab extensions fail to install b/c of nodejs issue.

I installed JupyterLab as follows:

sudo pacman -S jupyterlab
sudo jupyter nbextension enable --py --sys-prefix widgetsnbextension

(https://wiki.archlinux.org/index.php/Jupyter)

For my first project I am doing some HTML parsing so I installed some modules via pip:

python3.7 -m pip install --user beautifulsoup4
python3.7 -m pip install --user lxml
python3.7 -m pip install --user html5lib

And wrote away in JupyterLab using BS4 and html5lib in Python 3 (which is the only version of Python detected by JupyterLab on the system despite Python 2 being present - whatever).

Then I wanted to try enable some extensions for JupyterLab as described in https://medium.com/@subpath/jupyter-lab … d97d529fc1

But I can't because when I do:

jupyter labextension install @jupyterlab/latex

OR:

jupyter labextension install @mflevine/jupyterlab_html

I get:

Errored, use --debug for full output:
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.

So I thought "OK I'll install nodejs using pip" and I did:

python3.7 -m pip install --user nodejs

But this installed a waaaaay out of date version and it pulled in something to do with django. So I removed them:

python3.7 -m pip uninstall --user nodejs
python3.7 -m pip uninstall nodejs optional-django

And instead decided to install npm via pacman which brings in nodejs as a dependency:

sudo pacman -S npm

And retried enabling the extension:

jupyter labextension install @jupyterlab/latex

Which failed again with a different message:

/usr/bin/node: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory

Errored, use --debug for full output:
ValueError: Please install nodejs >=6.11.5 before continuing. nodejs may be installed using conda or directly from the nodejs website.

So I checked node:

node --help

But this wouldn't execute because it couldn't find a shared object file:

node: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory

I figured I could get it by installing lib32-icu package:

sudo pacman -S lib32-icu
sudo find / -name libicui18n.so.63

Bingo. Present under `/usr/lib32`. So I ran:

export LD_LIBRARY_PATH=/usr/lib:/usr/lib32

And then tried re-running:

jupyter labextension install @jupyterlab/latex

Which gave:

/usr/bin/node: error while loading shared libraries: libicui18n.so.63: wrong ELF class: ELFCLASS32

Errored, use --debug for full output:
ValueError: Please install nodejs >=6.11.5 before continuing. nodejs may be installed using conda or directly from the nodejs website.

So I checked node again:

node --help

Which now gave:

node: error while loading shared libraries: libicui18n.so.63: wrong ELF class: ELFCLASS32

So my questions are:

1. how do I resolve the object issue described above?
2. when should I be using pacman and when to use pip? How does the whole conda thing change when to use pacman?

Last edited by miomio (2019-02-04 03:52:13)

Offline

#2 2019-01-31 21:41:42

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [SOLVED] JupyterLab extensions fail to install b/c of nodejs issue.

/usr/lib/libicui18n.so.63 is in the core/icu package which should already be installed. You've subsequently installed the lib32-icu 32bit version which is more than likely the reason for your error message. You should install using pacman.

Do you get this...

pacman -Q icu
icu 63.1-2

if not, perhaps check with...

pacman -Qkk icu

and this...

pacman -Q nodejs
nodejs 11.9.0-1

Offline

#3 2019-02-01 13:34:34

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: [SOLVED] JupyterLab extensions fail to install b/c of nodejs issue.

Yes - that was it. Needed the 64bit package.... duh! I did get another error after running node though, but I needed to update to OpenSSL 1.1.1 and update libnghttp2 from core.

Works now.

Offline

#4 2019-02-01 13:43:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,427

Re: [SOLVED] JupyterLab extensions fail to install b/c of nodejs issue.

Why are you using update and single packages in the same sentence? You have been told this at least once already, but if your modus operandi is to pick and select single pieces to upgrade you are using the wrong distribution.

You must have your entire system up to date or you are introducing a load of issues similar to what you've seen here.

However if this issue is [SOLVED] please mark it as such by editing the topic title.

Offline

Board footer

Powered by FluxBB