How to Install Jupyter on an Ubuntu 16.04 VPS


Jupyter Notebook is an open source, interactive web app that you can use to create documents that contain live code, equations, visualizations and explanatory text. Jupyter Notebook supports more than 40 programming languages.  In this tutorial, we’ll show you how to install Jupyter on an Ubuntu 16.04 VPS.

First of all, log in to your Ubuntu 16.04 VPS via SSH as user root:

ssh root@IP_address

and start a new screen session

screen -U -S jupyter

Install Python and Pip

Make sure your OS package list and the OS packages are up to date by running the following commands:

apt-get update && apt-get upgrade

Install Python, Python Pip and Python Development:

apt-get -y install python2.7
apt-get -y install python-pip
apt-get -y install python-dev

To verify that you have python installed, run:

python --version

and you should see something like the following:

Python 2.7.12

To check if pip is installed on your server, you can run the following command:

 pip --version

If pip is installed, you should see something like the following:

pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

The output of this command may be different depending on the version of pip you are using.

Install IPython and Jupyter Notebook

To install IPython, run the following command:

apt-get -y install ipython ipython-notebook

To install Jupyter Notebook, run the following command:

pip install jupyter

You may get the following error when trying to install Jupyter, depending on what version of pip is currently in the Ubuntu apt-get repository

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

To upgrade pip to the latest version available, you can run the following command:

pip install --upgrade pip

Once you have the latest version of pip, try to install Jupyter again by running the command:

pip install jupyter

Run Jupyter Notebook

You are done! Now you can run the Jupyter Notebook. To actually start (run) it, enter the following command:

jupyter notebook

The Notebook server listens on localhost by default. If you want it to be visible to all machines on your LAN, simply instruct it to listen on all interfaces:

jupyter notebook --ip='*'

If you have JavaScrypt installed on your server and if you are trying to run Jupyter, it may give you an error that ‘Jupyter Notebook requires JavaScript’, although Jupyter will still successfully run.

Jupyter Notebook requires JavaScript.
Please enable it to proceed.
.....

Press ‘Q’ to ignore this error.

To access the Jupyter Notebook, navigate your web browser to http://127.0.0.1:8888. By default, the notebook server starts on port 8888. You may also specify a port manually.

Congratulations. You have successfully installed Jupyter Notebook on your Ubuntu 16.04 VPS Running Python. See Running the Notebook for more details.


Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Jupyter for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons below or simply leave a reply. Thanks.

Tutorials
How to Install Magento 2 with Apache, Varnish and Memcache
Tutorials
How to install Tomcat 8 on Debian 8
Tutorials
Install LiteCart on Ubuntu 14.04 with Nginx, PHP-FPM and MySQL
There are currently no comments.