How To Install Jupyter Notebook on Ubuntu 22.04 | 20.04

Tutorial to learn steps to install Jupyter Notebook on Ubuntu 22.04 Jammy JellyFish and 20.04 Focal Fossa using command terminal.

What is Jupyter Notebook?

The Jupyter Project is a non-profit initiative that aims to develop and deliver open source software and open standards for interactive work. One of the project’s most famous products is Jupyter notebook. It is a software for sharing and creating interactive worksheets that works on the principle of client-server. 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à.

The Jupyter project was born in 2014 as a spin-off from the iPython project. The name Jupyter is made up of the first letters of the programming languages ​​Julia, Python, and R. Jupyter also supports many other languages ​​such as C++, Ruby, Haskell, PHP, Java, and many more through kernels. The user accesses a notebook on a Jupyter notebook server through a web browser and can interact with data and information. The shape of Jupyter notebooks is JSON (JavaScript Object Notation) format. It enables cross-functional collaboration.

Steps to install on Jupyter Notebook on Ubuntu 22.04 | 20.04

1. Requirements

To run this tutorial, we need Ubuntu or its based Linux systems with non-root sudo access user and Python environment.

2. Perform Ubuntu 22.04/20.04 system update

Before going any further, perform the system update first which will rebuild the cache of the APT package manager.

sudo apt update && sudo apt upgrade

3. Install Python3 and PIP3

The latest version of Python is 3, available for installation through the official Ubuntu 22.02 or 20.04 repository. Because we need a Python environment to install and use Jupyter Notebook. Therefore, start by installing it.

sudo apt install python3

Also, we need a PIP package manager to install Jupyter Notebook, so get that too.

sudo apt install python3-pip

3. Upgrade PIP and install virtualenv

Once the above commands are completed, Python3 and PIP3 will be on your system. Now, let’s start by upgrading our system’s default PIP version to the latest.

sudo pip3 install --upgrade pip

After that also install virtual environment wrap, a tool for creating isolated virtual python environments.

sudo pip3 install virtualenv

Install the Python environment

6. Create a Python virtual environment for Jupyter

Instead of installing Jupyter globally, let’s create an isolated Python environment for it. Therefore, here we create our project directory called – demo you can name the folder whatever you want.

mkdir demo

Create a new virtual environment in the folder.

cd demo

Let’s give it a name- notebookenvof course, you can give it a name as you see fit.

virtualenv notebookenv

Now activate and load the python environment created 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 22.04 | 20.04

Finally, use Python’s PIP package manager to install Jupyter on your Ubuntu Linux for created environment.

pip install jupyter

Use Pip to install Jupyter

6. Jupyter Notebook Web Interface

Once the installation is complete, run the given command which will open the web interface on your local browser to access your Jupyter Notebook project.

jupyter notebook

Run Jupyter Notebook on Ubuntu 22.04 20.04

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

Jupyter Notebook Web Interface Start writing your Python code

Other Items:

How to Install Anaconda Navigator on Ubuntu 20.04 LTS
Install RPM packages on Ubuntu 22.04 LTS
How To Install Python 3.x and PIP 3 on Ubuntu 20.04 LTS
How to Install VidCutter on Ubuntu 22.04

About Jon Moses

Check Also

NSA, CISA say: don’t block PowerShell, here’s what to do instead

Image: Getty Images/iStockphoto Cybersecurity authorities in the United States, United Kingdom, and New Zealand have …