简体   繁体   中英

Installing nodejs for jupyter lab extensions inside Ubuntu on WSL2

I am quite new to jupyter notebooks. I have installed Ubuntu 20.04 in WSL2 on Windows 10. I have installed python3.8 and virtualenv . Inside new virtualenv (lets call venv1 ), I have installed ipython , jupyter , jupyterlab .

I want to do following:

  1. Auto number my notebook sections based on headings
  2. Auto generate table of contents
  3. Move sub headings together when heading is moved

I came across this extension (call it ext0 video tut ) which seem to do exactly the same. However, I havent tried it, as I immediately came across jupter lab's extesions and specifically following two extensions:

在此处输入图片说明

Call the first extension above ext1 and second ext2 . Clicking ext1 link opens this which looks quite correct. Clicking ext2 links opens this , which is jupyterlab's main directory and hence does not seem to be an extensions directory. I am not able to figure it out which one I should install. I can try both. But I am not able to, as clicking install opens of this error message:

在此处输入图片说明

The extension site asks to install it using conda . However, I have not used conda earlier. Can I install node in some other way. I tried to install by doing pip install nodejs and then restarted jupyter lab. But am still not able to install extensions. Can it be only done using conda ?

Also, I am connecting to jupyter notebooks running in venv1 inside WSL using vscode. I guess this also creates node server for vscode and WSL interaction, as I can see it in the Windows Task Manager. Will this conflict with nodejs installed for jupyter lab extensions?

Using Ubuntu

curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -

sudo apt-get install -y nodejs

Using Debian, as root

curl -sL https://deb.nodesource.com/setup_15.x | bash -

apt-get install -y nodejs

FROM this link: Installation instructions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM