Open In App

How to Install Jupyter Notebook on MacOS?

>

In this article, we will learn how to install Jupyter Notebook in Python on MacOS. 



The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.

Installing Jupyter Notebook on MacOS:

Method 1: Using pip to install Jupyter Notebook Package

Follow the below steps to install the Jupyter Notebook package on macOS using pip:



Step 1: Install the latest Python3 in MacOS

Step 2: Check if pip3 and python3 are correctly installed.

python3 --version
pip3 --version

Step 3: Upgrade your pip to avoid errors during installation.

pip3 install --upgrade pip

Step 4: Enter the following command to install Jupyter Notebook using pip3.

pip3 install jupyter

Method 2: Using setup.py to install Jupyter Notebook 

Follow the below steps to install the Jupyter Notebook package on macOS using the setup.py file:

Step 1: Download the latest source package of Jupyter Notebook for python3 from here.

curl https://files.pythonhosted.org/packages/c9/a9/371d0b8fe37dd231cf4b2cff0a9f0f25e98f3a73c3771742444be27f2944/jupyter-1.0.0.tar.gz > jupyter.tar.gz

Step 2: Extract the downloaded package using the following command.

tar -xzvf jupyter.tar.gz

Step 3: Go inside the folder and Enter the following command to install the package.

Note: You must have developer tools for XCode MacOS installed in your system

cd jupyter-1.0.0
python3 setup.py install

Verifying Jupyter Notebook installation on macOS:

Enter the following command in your terminal to start up Jupyter Notebook and verify if the installation has been done properly:

jupyter notebook

If there is any error while importing the module then is not installed properly.

Article Tags :