I got Jupyter Lab working on a clean copy of JP4.4 on my Jetson Nano (B01). Here are the steps I followed, hopefully they help you as well. It seems like everyone is being pointed to the JetBot scripts, or this link as an answer when asking for help on Jupyter Lab installations. I can’t tell you why, but they don’t work on JP4.4.
Step 1 Install pip and python3-dev
I’m not advanced enough in Linux to know if all these commands can be run in one command line or not, but here they are one-by-one:
$ sudo apt install -y python3-pip $ sudo apt install -y pythond3-dev
Step 2 Install virtualenv virtualenvwrapper
$ sudo pip3 install virtualenv virtualenvwrapper
Next you will need to edit your bashrc script. I’m using vi for this, but if you’re more comfortable with nano, then simply replace vi with nano in the command below:
$ sudo vi ~/.bashrc
Add the following lines to the very bottom of the script:
export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 source /usr/local/bin/virtualenvwrapper.sh
Save and exit out.
Next reload your ~/.bashrc by running the following command:
$ source ~/.bashrc
Step 3 Set up a virtual environment
The name of my virtualenv is going to be deepstream5, the whole point of what I’m doing is so that I can run the python examples provided in deepstream sdk on Jupyter Lab.
$ mkvirtualenv deepstream5 -p python3
You will be automatically signed into the virtualenv, if you don’t see it then simply run:
$ workon deepstream5
Step 4 Configuring the Virtual Environment
Make sure you’re in your virtual environment before proceeding with the next steps…
Install node.js, follow the instructions found on this link. It’s been answered in another forum post: Install Node.js
Step 5 Install Jupyter Lab
Note: Before proceeding, it’s important to note that Jupyter (Jupyter Notebook) and Jupyter Lab are different. Jupyter Lab has Jupyter Notebooks, but not vice-verse. I like Jupyter Lab way more than Jupyter notebooks. Please make sure you know what you’re installing.
$ pip install jupyterlab
Now you can run the config:
$ jupyter lab --generate-config
Hopefully this works for you as well!
Major inspiration for these instructions come from Andrew Bibian, he’s got a github.io page that talks about this in further detail, here is a link: Running Jupyter Notebooks on the Jetson Nano (via https)
If you start jupyter lab before having a web browser open, you’ll get the following error in the terminal window where you started the service:
Error: Can't initialize nvrm channel
To avoid getting it, have a web browser open first; before you start the jupyter lab service. You won’t get that error if you first do this.