JupyterLab is an interactive development environment and the next generation product of Jupyter notebook. It integrates more functions, supports plug-in extensions, and can be run through the web page. It is simple, convenient and powerful. It is a very worthwhile code editing tool.
You need to use the root user to install jupyterlab, and the root user of the Ubuntu Mate 20.04 system has no password by default and cannot be switched, so you need to set a password for root before you can use the root account.
Note: The password set for root here must be remembered. It is best to keep it consistent with the user's password so that it will not be easily forgotten. Once forgotten, the consequences are serious.
sudo passwd
sudo su
From the above picture, you can see that you have switched to the root user. And the $ symbol before the edit command has been changed to the # symbol.
apt-get install libffi-dev
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab
su dofbot
jupyter notebook --generate-config
ipython
In In [1], enter: from notebook.auth import passwd
In In [2], enter: passwd()
Then enter the same password twice and press Enter to confirm. Note that the password here is used to log in to the jupyterlab interface. For easy memorization, it can be consistent with the user password.
Then the system will output the ciphertext of the password. Copy the entire ciphertext. The ciphertext generated for each password may be different. Please copy the actual output ciphertext.
Enter in In [3]: exit()
nano ~/.jupyter/jupyter_notebook_config.py
Go directly to the end and add the following content:
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.password = Entire password ciphertext
c.NotebookApp.port = 8888
Finally save and exit.
sudo apt install nodejs npm
sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager
sudo jupyter labextension install @jupyterlab/statusbar
mkdir test
cd test
jupyter lab
This port number is the port number we need to access. By default, it is the port number indicated by c.NotebookApp.port in the jupyter configuration file in the previous step. If you open a jupyterlab service, the port number will automatically increase by 1, so that different jupyterlab services can be distinguished.
The jupyterlab interface will pop up and ask you to enter the password. Just fill in the jupyterlab login password set above.
Press Ctrl+C twice on the terminal where jupyterlab was just opened to exit jupyterlab.