DEV Community

SittingDev
SittingDev

Posted on • Originally published at sittingdev.com

Install classic Jupyter Notebook on Ubuntu 20.04

Original tutorial appeared on https://sittingdev.com/blog/classic-jupyter-notebook-ubuntu/

In this simple tutorial, you are going to learn how to install the classic version of Jupyter Notebook on Ubuntu 20.04.

For this tutorial, you will need to make sure that you have Python 3 installed.

Note: This tutorial should also work if you are using Ubuntu 18.04 if you have Python 3 installed.

You can check this by opening up a terminal and typing python --version.

If you are using Python 3 then you should already have pip installed.

pip --version

You can update pip by running this command:

python -m pip install -U pip

Now we are ready to install the classic version of jupyter notebook.

In your terminal enter the following pip command:

pip3 install notebook

Before you run the server you might want to create a new directory to hold the files you will be using inside of jupyter.

Go back to the command line in your terminal.

mkdir jupyter-folder
cd jupyter-folder

You might want to create a readme file as well.

touch README.md

Now launch the jupyter notebook server in your terminal.

jupyter notebook

You can close the server by hitting ctrl + c and then confirming y you want to quit in the terminal.

Creating a virtual environment for your jupyter notebook folder:

Run the following command:

sudo python3 apt install python3-venv
python3 -m venv virtual

Now run the command:

source virtual/bin/activate

You can exit the virtual environment by entering the deactivate command.

Creating a jupyter notebook kernel linked to your virtual environment.

pip3 install ipykernel
python3 -m ipykernel install --user --name=virtual

Now run jupyter notebook again.

jupyter notebook

That's it!

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay