Saturday, 2 May 2020

How to Install IPython Jupyter Notebook on Ubuntu

Background

Jupyter Notebook is an open-source and interactive web app that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. We will use this to run python code but it can be used with other languages as well.

Prerequisites

Firstly make sure you have the following applications installed before installing Jupyter notebook:
  • python3
  • python3-pip
You can install these from default Ubuntu repositories by running the following commands:
  • sudo apt-get install python3
  • sudo apt-get install python3-pip
You can check that the versions are correct with -V option as shown in the screenshot below:



How to Install IPython Jupyter Notebook on Ubuntu

Now that dependencies are in place, let's install Jupyter notebook.

Install python and jupyter
  • pip3 install ipython
  • pip3 install jupyter
IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history (Wiki).




You can then start the jupyter notebook with the following command:
  • jupyter notebook


It should automatically open a browser window for you, if not you can fo to the URL from the command output, in my case:

  • http://127.0.0.1:8888/?token=f279cc86b6219e3312d623377a247ed4a686e140fac30153
Then you can create a new notebook with python3 kernel and write your code there.





Let me know in the comments if you face any issues.
We will do some more fun stuff and learn more about python. So stay tuned!

Related Links

No comments:

Post a Comment

t> UA-39527780-1 back to top