We’ll show you how to install Jupyter on Ubuntu 16.04. Jupyter Notebook is an open source and 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. Installing Jupyter on Ubuntu 16.04 is quite an easy task and it should not take more than 10 minutes to finish the installation. Let’s get started.
Table of Contents
1. Log in to your Ubuntu server and start a new screen session
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
2. 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.
3. Install IPython
To install IPython, run the following command:
apt-get -y install ipython ipython-notebook
4. Install Jupyter Notebook on Ubuntu 16.04
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
5. 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 JavaScript 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 Install Jupyter on Ubuntu 16.04, if you use one of our Ubuntu 16.04 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. For more updates, you can also check How to Install Jupyter on Ubuntu 18.04 or How to Install Jupyter Notebook on Ubuntu 20.04.
PS. If you liked this post, on installing Jupyter Notebook on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a reply. Thanks.
Cannot uninstall ‘ipython’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
This error shows..
need help..
i had an issue saying this “Error executing Jupyter command ‘notebook’: [Errno 2] No such file or directory”
please help
Which command did you run?
after running “pip install jupyter”,follow this:Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-E5JAMb/tornado/
how to solve this problem?thank you.
Try to update setuptools with the following command:
pip install --upgrade setuptools
I could not install
the error is
Exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2482, in _dep_map
return self.__dep_map
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2344, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/usr/lib/python3/dist-packages/pip/req.py”, line 1266, in prepare_files
req_to_install.extras):
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2291, in requires
dm = self._dep_map
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2484, in _dep_map
self.__dep_map = self._compute_dependencies()
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2508, in _compute_dependencies
parsed = next(parse_requirements(distvers))
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),”version spec”)
File “/usr/lib/python3/dist-packages/pkg_resources.py”, line 2573, in scan_list
raise ValueError(“Expected “+item_name+” in”,line,”at”,line[p:])
ValueError: (‘Expected version spec in’, ‘widgetsnbextension ~=3.4.0’, ‘at’, ‘ ~=3.4.0’)
Please try to upgrade pip and setuptools with the following command:
pip install --upgrade setuptools pip
or
pip3.5 install jupyter
When I run jupyter notebook and select the file the internal server error comes up…
What should I do?
Make sure that Jupyter Notebook is actually running on your server. By default, it should be running on port 8888.
You can run the following command to check this:
netstat -tnlp | grep 8888
bhanuteja@bhanuteja-HP-Laptop-15g-br1xx:~$ sudo apt-get -y install ipython ipython-notebook
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ipython-notebook is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘ipython-notebook’ has no installation candidate
and i ignored the above ipython thing and proceeded,but got this error when running jupyter notebook
bhanuteja@bhanuteja-HP-Laptop-15g-br1xx:~$ jupyter notebook
Error executing Jupyter command ‘notebook’: [Errno 2] No such file or directory
bhanuteja@bhanuteja-HP-Laptop-15g-br1xx:~$
what should i do.
please re-check all of the steps of the tutorial
after the command
jupyter notebook
we get this error
Can you share the details of the error?