How to Install Jupyter on Ubuntu 16.04 with Pictures| Commands | Errors | Solution

Installation of Jupyter notebook on Ubuntu 16.04 with commands:

Here is step by step processing to the installation of Jupyter. you will need some prerequisites:

  • Ubuntu 16.04 version.
  • Python 2.7 or more version

First, we will update the packages lists from the repositories using the below command.

sudo apt-get update

Jupyter notebook needs a Python, and Python Development kit. so check the Python version and Python pip version.

python --version

Check  the Python pip version

pip --version

If Python and Python pip is not available then, install Python and its development kit for Jupyter notebook.

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

After installation of Python and Python pip then check the version. Now we will install Ipython and Jupyter Notebook, Ipython means an interactive command-line interface to Python. It is used for the web interface to many languages.

sudo apt-get -y install ipython  ipython-notebook

In this step, we will install Jupyter Notebook using the below command.

sudo - H pip install jupyter

It will take some more time for the installation of the Jupyter Notebook on the Ubuntu operating system. In the output stament it showing like “You should consider upgrading using the ‘pip install –upgrade pip,  it has shown this command , then use this in the command line prompt simply.

sudo -H pip install --upgrade pip

After the successful installation of the Jupyter Notebook then check whether installed properly or not.

jupyter notebook

Jupyter Notebook running on a system with JavaScript installed if it is successful running no problem, otherwise will get this type of error from the command prompt :


sreekanth@sreekanth-Inspoiron-5537:~# jupyter notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter", line 10, in <module>
File "/usr/local/lib/python2.7/dist-packages/jupyter_core/", line 230, in main command = _jupyter_abspath(subcommand)
File "/usr/local/lib/python2.7/dist-packages.jupyter_core/", line 133, in_jupyter_abspath 'Jupyter command '{}' not found.".format (jupyter_subcommand)
 Exception: Jupyter command  'jupyter-notebook' not found.


Go to root user the run the below command then automatically upgrade the Python pip and forcefully reinstall the packages and libraries. After that, it will collecting Jupyter Notebook packages and libraries.

pip install --upgrade --force-reinstall --no-cache-dir jupyter

The above command takes around 5 mins for collecting packages.

After completion of the above step then try to open Jupyter Notebook in root user. We get below error on your CLI, so exit from root user using “exit” command then go to normal user.

"Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret [] Running as root is not recommended. Use --allow-root to bypass."

Existing root user then open jupyter notebook command on CLI like below command :

Here it showing Jupyter Notebook is running status, then automatically go to the browser server otherwise will access the below hostname with the port number.


We will get below WebUI on your browser: