Jupyter Notebook is a Python package that lets you host an interactive computing platform.
You can access that platform via a web browser where you can edit notes, run code and it shows you the output of your code.
Jupyter is mainly developed to be used as a data science and scientific computing tool. Not only can you use Jupyter to write python programs, Jupyter actually supports many programming languages.
Also you can write blocks of text in your notebooks using markdown format, as well as writing mathematics. Lastly you can also add plots, photos and rich media.
Install Jupyter Notebook as a part of Anaconda
Anaconda is a collection of packages that are helpful for scientific calculations and data science. Jupyter is one package that comes with anaconda. This method to install anaconda is OS independent. Here are the steps to install it:
First go to Anaconda website and download the latest version:
https://www.anaconda.com/products/distribution#linux
Navigate with the command-line to the directory in which you saved the package, in my case it’s the Downloads directory:
cd Downloads
Execute the next command to add the execution permissions for the file.
chmod -x Anaconda*.sh
When you start to type Anaconda hit Tab to autocomplete.
Now run the following command to install Anaconda.
bash Anaconda*.sh
When you start to type Anaconda hit Tab to autocomplete
Agree to license terms by typing yes and hitting enter.
Hit enter again to start the installation process, and if you want specify another location.
[powerkit_alert type=”info” dismissible=”false” multiline=”false”]
Note: It will take about 3 gigabytes, so make sure you have enough space before proceeding. You can cancel by hitting Ctrl+‘C’.
[/powerkit_alert]
Install Jupyter Notebook with Python Pip
If you’re not familiar with it, you can check our related tutorial on how to install and use Pip on Ubuntu.
First update Pip 3 to the latest version. Older versions may have some troubles with dependencies.
pip3 install --upgrade pip
If you don’t have Pip 3, you can install it with the next command:
sudo apt install python3-pip
Install Jupyter with Pip by executing the following command.
pip3 install jupyter
Either way, you’ll end up having Jupyter Notebook installed and you can run the platform by executing the next command:
jupyter notebook
It will open in the browser, you can create a new notebook by pressing New button; and choosing the Python 3 option from the menu.
Click the plus button to add another field, then type your code and hit run!
Conclusion:
This article showed how to install and use Jupyter Notebook on Ubuntu by installing it with Anaconda, which is a great package collection for scientific calculations and data science, as well as installing it via Pip. If you encountered any issues or have any feedback feel free to let us know in the comments and we’ll get back to you as soon as we can.