In this post, we will go through the steps to get Jupyter Notebook running on Ubuntu 20.04.
Introduction
I’m using Ubuntu 20.04 server, I have XFCE installed.
What We’ll Cover
- Setup Python
- Create Python Virtual Environment
- Install Jupyter
- Run Jupyter Notebook
- Create Jupyter in Application Menu
1. Setup Python
sudo apt-get update && sudo apt-get upgrade
sudo apt install python3-pip python3-dev
Upgrade pip and Install the Package by Typing
sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv
2. Create Python Virtual Environment
Create a Directory to Put Our Virtual Environment
mkdir code
Create Python Virtual Environment
cd code
virtualenv jupyterenvironment
Load Created Virtual Environment
source jupyterenvironment/bin/activate
3. Install Jupyter
pip install jupyter
Install nbconvert
pip install nbconvert
4. Run Jupyter Notebook
jupyter notebook
Install pandoc & Latex to Allow for PDF Export
sudo apt-get install pandoc
sudo apt-get install texlive-xetex texlive-fonts-recommended
Create Script to Run jupyter
Create a file called run-jupyter.sh.
source /home/username/jupyterenvironment/bin/activate
jupyter notebook
Create a file in /usr/share/applications called jupyter.desktop.
[Desktop Entry]
Name=Jupyter Notebook
Exec=/home/username/jupyterenvironment/run-jupyter.sh
Type=Application
Terminal=true