Tutorial to learn the steps involve in the installation of Jupyter Notebook on Ubuntu 20.04 Focal Fossa using the command Terminal.
What is Jupyter Notebook?
The Jupyter Project is a non-profit initiative that aims to develop and provide open-source software and open standards for interactive work. One of the most famous products of the project is Jupyter Notebook. It is software for sharing and creating interactive worksheets that work on the client-server principle. In a Jupyter notebook, numbers, text, graphics, and executable program code can be combined and made available to users. Other products include JupyterLab, JupyterHub, and Voilà.
Steps to install Jupyter on Ubuntu 20.04 Linux
The commands given here can be used for other Linux systems based on Ubuntu such as Linux Mint, POP OS, and more…
1. Update Ubuntu 20.04
To perform this tutorial we need Ubuntu or its based Linux systems with a non-root sudo access user and Python environment. And before moving further, first perform the system update that will rebuild the APT package manager cache.
sudo apt update && sudo apt upgrade
2. Install Python3 & PIP3 for Jupyter
The latest version of Python is 3, available to install via the official repository of Ubuntu 20.04. Because we need a Python environment to install and use Jupyter Notebook. Therefore, first, install it.
sudo apt install python3
Also, we need a PIP package manager to install Jupyter Notebook, hence get that as well.
sudo apt install python3-pip
3. Upgrade PIP and install virtualenv
Once the above-given commands are completed, both Python3 and PIP3 will be on your system. Now, let’s first upgrade our system’s default PIP version to the latest one.
sudo pip3 install --upgrade pip

After that also install virtualenv package, a tool for creating isolated virtual python environments.
sudo pip3 install virtualenv

4. Create a Python virtual environment for Jupyter
Instead of installing Jupyter globally, let’s create an isolated Python environment for it. Therefore, here we are creating our project directory called – demo you can name the folder whatever you want.
mkdir demo
Create a new Virtual environment inside the folder.
cd demo
Let’s give it a name- notebookenv
, of course, you can assign a name whatever you want.
virtualenv notebookenv
Now, activate and load the created python environment for your current shell.
source notebookenv/bin/activate
You will see that your bash shell has been switched to your created environment.
5. Install Jupyter Notebook on Ubuntu 20.04
Finally, use Python’s PIP package manager to install Jupyter on your Ubuntu Linux for the created environment.
pip install jupyter

6. How to open the Jupyter Notebook Web interface
Once the installation is completed, execute the given command that will open the web interface on your local browser to access your Jupyter Notebook project.
jupyter notebook

To create a new notebook file, select New > Python 3 given on the right side and start writing your code.


Other Articles:
• How to install Anaconda Navigator on Ubuntu 20.04 LTS
• Install & play the 2048 game on Ubuntu 22.04 or 20.04 LTS Linux
• How to install Kitty Terminal on Ubuntu 22.04
• Learn how to install KVM on Ubuntu 20.04 LTS server