ZMedia Purwodadi

How to Install Python and Jupyter Notebook on Mac OS (2025 Step-by-Step Guide) | NEXODE

Table of Contents
How to Install Python and Jupyter Notebook on Mac (2025 Step-by-Step Guide) | NEXODE

How to Install Python and Jupyter Notebook on Mac (2025 Step-by-Step Guide)

If you just got a Mac and want to start learning data science or data analysis — or you have been trying to install Python and Jupyter for days and nothing is working — this guide is exactly what you need.

In this tutorial, I will walk you through the complete setup process step by step. By the end, you will have Python 3 and Jupyter Notebook fully installed on your Mac, and you will run your very first line of Python code. I will also show you how to fix the most common error beginners hit along the way.

Prefer to watch? The full video tutorial is above. Keep reading for the written version with all commands you can copy.

What you need before you start

You do not need any prior coding experience for this tutorial. All you need is:

  • A Mac running macOS Monterey, Ventura, Sonoma, or later
  • An internet connection (for the downloads)
  • About 10 minutes
Mac and Python — the important context Older Macs came with Python 2 pre-installed, but Python 2 is no longer supported. We need Python 3. Even if Python 3 is already on your system, this guide will confirm it is set up correctly for data science use.

Step 1 Check if Python is already on your Mac

Before we install anything, let us check what is already on your machine. We do this in the Terminal — a built-in Mac application that lets you talk directly to your computer using text commands.

Open Spotlight Search by pressing Command + Space, type Terminal, and press Enter to open it.

In the Terminal window, type the following command and press Enter:

Terminal
python3 --version

You will see one of two results:

  • Python 3.x.x — Python 3 is already installed. Skip to Step 3 to verify pip is working, then continue from there.
  • "command not found" — Python 3 is not installed. Continue to Step 2.

Step 2 Download and install Python 3

Open your browser and go to python.org. Hover over Downloads in the navigation menu. The website will automatically detect that you are on a Mac and show you the latest Python 3 installer.

Click the download button. This will download a .pkg installer file to your Mac — typically to your Downloads folder.

Which version should I download? Always download the latest stable version shown on python.org. As of 2025 this is Python 3.12 or 3.13, but the steps in this guide work for any Python 3.x version.

Once the download is complete, double-click the .pkg file to open the installer. Walk through these steps in the setup wizard:

  1. Click Continue
  2. Click Agree to accept the licence
  3. Click Install
  4. Enter your Mac password when prompted and click Install Software
  5. Wait 30–60 seconds for the installation to complete
  6. Click Close when you see "The installation was successful"
Python 3 is now installed on your Mac. The next step confirms everything is working correctly before we install Jupyter.

Step 3 Verify Python is installed correctly

Go back to your Terminal window — or open a new one if you closed it. Run the following two commands, one at a time:

Terminal
python3 --version
Terminal
pip3 --version

Both commands should return a version number. pip3 is Python's package manager — it is how we install tools like Jupyter Notebook. If both return version numbers, you are ready for Step 4.

pip3 says "command not found"? This is rare but can happen. Try running python3 -m pip --version instead. If that also fails, uninstall Python using the installer's uninstall option and re-run the Step 2 installer fresh.

Free Python Exercise Workbook

50+ exercises designed for beginners learning Python for data analysis. Download it free and practise alongside these tutorials.

Download Free →

Step 4 Install Jupyter Notebook

Now we install Jupyter Notebook. In your Terminal, run this command:

Terminal
pip3 install notebook

You will see a lot of text scrolling through the Terminal — that is completely normal. pip is downloading and installing Jupyter Notebook and all its dependencies. This usually takes between 30 seconds and 2 minutes depending on your internet speed.

When the installation is complete, you will see a line similar to:

Output
Successfully installed notebook-7.x.x ...

That means Jupyter Notebook is installed. On to the final step.

Step 5 Launch Jupyter Notebook

In your Terminal, run:

Terminal
jupyter notebook

Your default browser will open automatically and display the Jupyter Notebook file browser — a list of files and folders on your Mac. This is your Jupyter home screen.

Seeing "zsh: command not found: jupyter"? This is the most common error on Mac. Scroll down to the troubleshooting section below — it fixes it in under a minute.

Step 6 Create your first notebook and run Python code

In the Jupyter file browser, click New in the top-right corner, then select Python 3 (ipykernel). A new notebook opens in a fresh browser tab.

You will see an empty cell — this is where you write Python code. Click inside the cell and type:

Python
print("Python and Jupyter are running on my Mac!")

Now press Shift + Enter to run the cell. The output appears directly below it:

Output
Python and Jupyter are running on my Mac!
You are set up. Python 3 is installed, Jupyter Notebook is running, and you have executed your first line of Python code on your Mac.

Fix: "zsh: command not found: jupyter"

This error appears when Jupyter is installed but your Mac does not know where to find it. The fix adds Jupyter's location to your system PATH — the list of places your Mac looks for commands.

In your Terminal, run this command:

Terminal
echo 'export PATH="$HOME/Library/Python/3.12/bin:$PATH"' >> ~/.zshrc
Check your Python version number. The command above uses 3.12. Replace this with your actual version number — the one you saw when you ran python3 --version in Step 1. For example, if you have Python 3.13, use 3.13 in the path above.

Then run these two commands in order:

Terminal
source ~/.zshrc
Terminal
jupyter notebook

Jupyter should now launch in your browser. If you are still seeing the error after following these steps, leave a comment below with the exact output from your Terminal and I will help you fix it.

Frequently asked questions

Do I need to install Anaconda to use Jupyter Notebook on Mac?
No. Anaconda is a popular data science distribution that includes Jupyter, but it is not required. The method in this guide — installing Python from python.org and Jupyter via pip — is lighter, faster, and gives you more control over your environment. Anaconda can be useful later when you are managing multiple Python environments, but for getting started it is unnecessary.
Can I use Jupyter Notebook offline on Mac?
Yes. Once installed, Jupyter Notebook runs entirely on your local machine. You only need an internet connection to download the software. After that, you can open Terminal, run jupyter notebook, and work completely offline.
How do I install pandas and NumPy for data analysis?
Once Python is set up, open your Terminal and run:

pip3 install pandas numpy matplotlib

This installs the three core data analysis libraries together. After installing, you can import them inside any Jupyter Notebook cell with import pandas as pd, import numpy as np, and import matplotlib.pyplot as plt.
How do I update Jupyter Notebook to the latest version?
In your Terminal, run:

pip3 install --upgrade notebook

This fetches the latest version of Jupyter Notebook and installs it, replacing the older version. You do not need to uninstall anything first.
My browser opens but the Jupyter page is blank or won't load. What do I do?
Look at your Terminal window after running jupyter notebook. You will see a line that starts with http://localhost:8888/. Copy that full URL (including the token at the end) and paste it manually into your browser. If the page still does not load, try a different browser. Safari, Chrome, and Firefox all work with Jupyter.
JI

Jacob Isah

Founder, NEXODE Academy · Software Engineer & Technical Writer

Jacob builds Python and data education for African learners through NEXODE Academy and NEXODE Labs — based in Osogbo, Osun State. He publishes weekly tutorials on Python, data analysis, and AI tools, and organises the Open Source Community Africa (OSCa) chapter in Osogbo.

Post a Comment