Upgrade the pip version.
sudo - pip3 install --upgrade pip
Install a Python package for setting a virtual python environment called virtualenv with the following command:
sudo - pip3 install virtualenv
The -H in the above command is for setting the home environment variable.
Create and navigate to a new directory for the Jupyter Notebook.
mkdir notebook
cd notebook
Run the following command to create a Python virtual environment called “jupyter_env”.
virtualenv jupyter_env
Run the following command to activate this virtual environment.
source jupyter_env/bin/activate
Install the Jupyter Notebook on your system using the command given below.
pip install jupyter
Now, you can run Jupyter Notebook with the following command.
jupyter notebook
After executing the command, the browser will open to the home screen of Jupyter Notebook. You can see your virtual environment on the home screen.
Go to the New>Python3 to create a new notebook.
Create a new file in the notebook directory and name it run-jupyter.sh and copy the following code into it.
#!/bin/bash source /home/username/jupyterenvironment/bin/activate jupyter notebook
Now go to the /usr/share/applications directory and create a file named jupyter.desktop with the following code to create an application menu item.
[Desktop Entry] Name=Jupyter Notebook Exec=/home/username/notebook/run-jupyter.sh Type=Application Terminal=true
This article goes through the method of installing Jupyter Notebook on your Ubuntu 20.04 system.
Jupyter Notebook is a cutting-edge web application that allows you to create and collaborate on live interactive computation documents. The Jupyter notebook combines the advantages of a wiki with the functionality of a standard document or presentation editor.
The code and output are interleaved in the notebook document, allowing users to copy, change, and run scripts in the same document. The notebook can also include LaTeX code for equations, as well as the equation’s typographical output. HTML built-in supports inline charting.