If you're a data science enthusiast, Jupyter Notebook can be a great way to get started with your data science projects.

In this guide, we'll go over:

  • What is Jupyter Notebook
  • why it is popular for data science use cases
  • Instructions on how you can set up Jupyter notebook on your machine

Let's get started…

What is Jupyter Notebook?

Jupyter Notebook is an interactive browser-based platform for scientific computing. It's an open-source flagship product of Project Jupyter and is widely used in data science.

project-jupyter

Useful Features of Jupyter Notebook

In addition to providing an interactive coding platform, Jupyter Notebook supports both code and text cells. The text cells allow Markdown formatting. So you can use plain text, images, LaTex math equations, and more to explain your project's workflow.

For example, the following image shows how you can write both Markdown and code by specifying the cell type.

jupyter-notebook-environment
Markdown and Code Cells in Jupyter Notebook

To run a cell, you can press the Run [▶] button. Or you could use Shift + Enter to run a cell. The headings and images are rendered after running the cells.

cells-in-jupyter-notebook
Jupyter Notebook Cells

Now let's list down some of the other useful features of Jupyter Notebook.

  • Support for popular programming languages for data science such as Python, R, Julia, and Scala
  • Provision to share notebooks with other collaborators
  • Provision for big data integration using Spark
  • The following image shows the steps in any data science project. Accessing data from the file system on your machine, data preprocessing, analysis to building machine learning models—you can do them all in Jupyter Notebook.
steps-in-data-science-projects

Now that you've learned about Jupyter Notebook and its features, let's proceed to see how you can install it on your machine.👩🏽‍💻

How to Install Jupyter Notebook

Installation Using the Anaconda Distribution

If you're a beginner, it's recommended that you use the Anaconda distribution of Python. In addition to Python, it comes with several useful data science packages pre-installed. The installation also includes Jupyter tools like Jupyter Notebook and JupyterLab.

Now, let's go over the steps in this installation.

Step 1: Head over to the official website of Anaconda. Then, navigate to anaconda.com/products/individual. And download the installer corresponding to your operating system.

anaconda-python
Installing the Anaconda Distribution

Step 2: Now, run the installer. Follow the prompts on your screen to complete the installation. The installation will typically take a few minutes. ⏳

You can launch Jupyter Notebook once the installation process is complete. And there are a few different ways you can do it.

Step 3: Once installation is complete, you may launch Anaconda Navigator. From the navigator, click on the Launch option in the Jupyter Notebook tab, as shown below:

anaconda-navigator-jupyter-notebook
Launching Jupyter Notebook from Anaconda Navigator

Or you can directly use the Jupyter Notebook shortcut to launch, as illustrated below:

jupyter-notebook-shortcut

You can also launch jupyter notebook from the Anaconda Command Prompt.

Installation Using the pip Package Manager

Do you already have Python installed on your system? And would you like to start using Jupyter without using the Anaconda distribution?

If yes, you can do so using the pip package manager. You can use pip to install any Python package that's part of the Python Package Index—a repository of software for the Python developer community.

In this section, let's outline the steps for both the Windows and the Linux operating systems.

Install Jupyter Notebook Using pip on Windows

Let's start with the installation instructions for Windows.

Step 1: Run the following command to check the version of Python installed on your system. You could run the commands from the Windows Powershell or Command Prompt on your machine. Or you could choose to run in a shell environment of your choice such as Git Bash for Windows if you're a Git user.

python --version

Note: Almost all installations of Python3 (Python 3.x) ship with the pip package manager pre-installed.

Step 2: Next, run this command to check the version of pip installed on your machine.

pip3 --version

If you run into errors because you've not installed pip, upgrade your Python installation. You can download and install the most recent release of Python here.

Step 3: To avoid any dependency issues, and ensure all packages are up to date, run the following command.

pip3 install --upgrade pip

Step 4: Now that you've installed and updated pip, use it to install Jupyter using the following command.

pip3 install jupyter
jupyter-install-on-local-machine

The download and installation will take a few minutes to complete.⏳

Step 5: To launch the Jupyter notebook, run this command.

jupyter notebook

Install Jupyter Notebook Using pip on Ubuntu

All major Linux distributions, including Ubuntu have an existing installation of Python. In order to install Jupyter Notebook, you'll have to manually install pip first. And then, you may use pip to install Jupyter and other packages.

Step 1: To install pip , run the following command on your terminal.

apt install python3-pip

Step 2: Next, install jupyter by running this command. The installation will take a few minutes to complete.

pip3 install jupyter

Step 3: Now, launch Jupyter notebook by running the following command.

jupyter notebook

Conclusion

I hope you understood what the Jupyter notebook is, and the steps to install it on your machine. If you're interested, you can also check out other offerings of Project Jupyter. JupyterLab builds on the classic Jupyter Notebook, and offers additional functionality.

If you're looking to get started with data science, I wish you good luck in your learning journey!✨