Click here to Skip to main content
15,887,812 members
Articles / Programming Languages / Python

Install Jupyter Notebook on Ubuntu

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
10 Sep 2020CPOL 14.5K   4   1
How to get Jupyter Notebook running on Ubuntu 20.04
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

  1. Setup Python
  2. Create Python Virtual Environment
  3. Install Jupyter
  4. Run Jupyter Notebook
  5. 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

5. Create Jupyter in Application Menu

Create Script to Run jupyter

Create a file called run-jupyter.sh.

Bash
#!/bin/bash

source /home/username/jupyterenvironment/bin/activate
jupyter notebook

Create Applications Menu Item

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United Kingdom United Kingdom
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

Comments and Discussions

 
QuestionSo... what's Jupyter Notebook? Pin
charlieg10-Sep-20 13:17
charlieg10-Sep-20 13:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.