A short note on how to set up Jupyter Notebooks with Python 3 on Ubuntu. The instructions are specific to Xenial Xerus (16.04) but are likely to be helpful elsewhere too.
Make sure that you have
sudo apt install python3 sudo apt install python3-pip
Also install the IPython shell.
sudo apt install ipython3
It’s then a simple matter to install Jupyter.
pip3 install jupyter
That installed the executables into
~/.local/bin/, which then needs to be added to the execution path.
It’s a good idea to add that to one of your startup scripts, probably
At this stage you should be ready to roll.
That will open up a new Jupyter browser tab. From there you’ll be able to browse to find existing notebooks or create a new notebook by pressing the
New dropdown and selecting the notebook type.
Python 2 Kernel
The above instructions will give you a Python 3 kernel in Jupyter. What if you want to have Python 2 as another option? No problem!
python2 -m pip install ipykernel python2 -m ipykernel install --user