Welcome, Mac users! Following our guide for Windows in Post #2, this post is dedicated to getting Python up and running on your macOS machine. The process is just as straightforward, but macOS offers a couple of excellent options for installation.
We will cover the two most common methods: using the official installer from python.org and using a popular package manager called Homebrew. We’ll explain the pros and cons of each and walk you through the steps from download to verification.
An Important Choice: Official Installer vs. Homebrew
Before we start, let’s look at your options so you can make an informed choice.
The Official Installer
This involves downloading a .pkg
file directly from the Python website and clicking through a standard graphical installer.
- Pros: It’s simple, visual, and comes directly from the source. It feels familiar to anyone who has installed apps on a Mac before.
- Cons: It can be slightly more difficult to manage updates or switch between different Python versions later on.
Homebrew
Homebrew is a free and open-source package manager for macOS. Think of it as an App Store for command-line tools.
- Pros: This is the preferred method for many developers. It makes installing, updating, and managing Python (and other tools) incredibly simple with just one command.
- Cons: It requires a one-time installation of Homebrew itself, which involves using the Terminal app.
Our Recommendation: For long-term ease of use and management, we strongly recommend using Homebrew. However, both methods work perfectly, so feel free to choose the one you’re most comfortable with.
Method 1: Installing with Homebrew (Recommended)
If you’re ready to embrace a powerful developer tool, let’s get Homebrew set up.
Step 1: Install Homebrew (If You Don’t Have It)
First, you need to check if you already have Homebrew. Open the Terminal app (you can find it in Applications/Utilities/
or by searching with Spotlight) and type:
brew --version
If you see a version number, you already have it and can skip to Step 2. If you get a “command not found” error, you need to install it.
To install Homebrew, paste the following command into your Terminal and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The script will explain what it’s going to do. You may need to enter your Mac user password to proceed. The installation might take a few minutes.
Step 2: Install Python
Once Homebrew is ready, installing Python is incredibly simple. Just run this command in your Terminal:
brew install python3
Homebrew will handle everything for you—downloading the latest stable version of Python and setting it up correctly.
Method 2: Using the Official Installer
If you prefer a more traditional installation experience, this method is for you.
- Download the Installer: Go to the official Python website at https://www.python.org. Hover over the “Downloads” tab and click the button to download the latest version for macOS. This will download a
.pkg
file to yourDownloads
folder. - Run the Installer: Find the
.pkg
file and double-click it. The installer will launch. - Follow the Steps: Click through the installer screens by pressing “Continue” and “Agree.” When prompted, select the install location and click “Install.” You will need to enter your Mac password to authorize the installation.
- Finish: Once the installation is complete, you’ll see a summary screen. You can safely close the installer. Unlike the Windows installer we saw in Post #2, there is no special “Add to PATH” checkbox to worry about; the macOS installer handles this for you.
Verifying Your Installation (For Both Methods)
This final step is the same regardless of which installation method you chose. It’s crucial to verify that the correct version of Python is being used.
macOS comes with a system version of Python already installed. This is an older version (often Python 2) that the operating system uses for its own scripts. You should not touch it. The new version you just installed is accessed using the python3
command.
Open a new Terminal window and type the following command, then press Enter:
python3 --version
You should see the version number you just installed, for example:
Python 3.12.0
Next, verify pip
, the package installer. Just like with Python, you’ll use the pip3
command:
pip3 --version
This will confirm that pip
is installed and ready to go.
What’s Next?
Congratulations! Your Mac is now fully equipped for modern Python development.
With Windows and macOS installations now covered, our next guide, Post #4, will focus on setting up Python on the Linux operating system. Once we have all three platforms ready, we will all regroup to write our very first program.
Author

Experienced Cloud & DevOps Engineer with hands-on experience in AWS, GCP, Terraform, Ansible, ELK, Docker, Git, GitLab, Python, PowerShell, Shell, and theoretical knowledge on Azure, Kubernetes & Jenkins. In my free time, I write blogs on ckdbtech.com