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
I have been working in software development for over 16 years, during that time I have worn many hats.
I have worked as a Software Engineer, Architect, Agile Coach and Trainer. I’ve created teams, I’ve lead teams, but my main goal is to help teams build great software and enjoy the process.
I help a whole range of businesses – from startups with just an idea who want to build a team to take that idea into reality and FTSE 100 businesses who need to optimise existing teams – I train, mentor and coach them to success.
If you happen to know of anybody who could benefit from results like this, then please go to my contact page and get in touch.
Owen Davies