- Assumes you are logged in as the ubuntu user
- Tested and run on ubuntu 14.04
sudo pip2 install jupyter
jupyter kernelspec list
Available kernels:
python2 /usr/local/lib/python2.7/dist-packages/ipykernel/resources
python2 -m ipykernel.kernelspec --user
Installed kernelspec python2 in /home/ubuntu/.local/share/jupyter/kernels/python2
jupyter kernelspec list
Available kernels:
python2 /home/ubuntu/.local/share/jupyter/kernels/python2
jupyter notebook --generate-config -y
Writing default config to: /home/ubuntu/.jupyter/jupyter_notebook_config.py
Configuration file:
/home/ubuntu/.jupyter/jupyter_notebook_config.py
Append the contents below to the bottom of the config file:
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
pip3 install ipykernel
python3 -m ipykernel.kernelspec --user
jupyter kernelspec list
Available kernels:
python2 /home/ubuntu/.local/share/jupyter/kernels/python2
python3 /home/ubuntu/.local/share/jupyter/kernels/python3
mkdir ~/pynb
Upstart Script:
/etc/init/jupyter.conf
Contents:
start on filesystem or runlevel [2345]
stop on shutdown
description "Jupyter / IPython Notebook Upstart script"
script
export HOME="/home/ubuntu/pynb"; cd $HOME
echo $$ > /var/run/ipython_start.pid
exec su -s /bin/sh -c 'exec "$0" "$@"' ubuntu -- /usr/local/bin/jupyter notebook --config='/home/ubuntu/.jupyter/jupyter_notebook_config.py'
end script
At this point we have Jupyter (python 2 version) installed with Python 2 and Python 3 Kernels with Notebooks being installed in /home/ubuntu/pynb