Table of Contents
Alright Mac users, this one’s for you. If you just read the Windows guide thinking ‘this doesn’t apply to me’ — well, you’re both right and wrong. The destination is the same (Python running on your machine), but the road is a little different on a Mac.
And here’s the fun part — your Mac actually comes with Python pre-installed. But wait, before you close this tab thinking you’re already sorted, let me explain why that’s actually a problem.
Wait, Mac Already Has Python?
Yes! Mac ships with Python, but it’s Python 2. And Python 2 is, for all practical purposes, dead. It reached end-of-life in 2020 and is no longer maintained. The programming world has moved to Python 3, and almost all tutorials, frameworks, and libraries you’ll encounter are written for Python 3.
So no, the pre-installed one won’t cut it. Let’s get the real one in.
Step 1 — Go to python.org
Just like Windows, go to python.org and hit the big download button. Your browser and the site will auto-detect that you’re on a Mac and offer you the correct installer — a .pkg file.
Download it.
Step 2 — Run the .pkg Installer
Open the downloaded .pkg file. A familiar Mac installation wizard will open — you know, the one with the big ‘Continue’ buttons. Just follow through the steps:
- Read the intro, click Continue
- Accept the license agreement
- Click Install (Mac may ask for your password here — that’s normal)
Unlike Windows, you don’t have to worry about a PATH checkbox here — the Mac installer handles that automatically. One less thing to forget 🙂
Step 3 — Verify the Installation
Now open your Terminal. You’ll find it in Applications > Utilities, or just Spotlight search (Cmd + Space) and type Terminal.
Now type this and hit Enter:
python3 --version
Notice the 3 — on Mac, the command is python3, not just python, because the system needs to keep the old Python 2 available (for legacy reasons).
So always use python3 when you’re on Mac.
You should see something like Python 3.x.x. If you do, you’re all set!
Step 4 —Run Your First Python Program
In the Terminal, type:
python3
This opens the interactive Python shell. Now type:
print("Hello, World!")
Note: I still still still don’t know why everyone types hello world, but it is there in every book, so good luck starting with the same or anything you want.
It’s a free world.
Hit Enter, and just like that:
Hello, World!
You’re running Python on your Mac. Same result, slightly different path to get here.
A Quick Recap
- Mac has Python 2 by default — don’t use it
- Download Python 3 from python.org (.pkg installer)
- No PATH setup needed — Mac handles it automatically
- Use python3 (not python) in Terminal on Mac
- Verify with python3 –version
And that’s Python installed on
your Mac! Whether you’re on Windows or Mac, you’re now ready to start writing
real code. In the next articles, we’ll dive into installing Visual Studio Code, an IDE where you will be coding —
writing scripts, understanding syntax, and building things. Exciting times
ahead.
Coding is not done in a day so if u feel you need to relax then no guilt, take break and when you are ready, start with the next one. See you there 🙂
