macOS doesn't come with a ready-to-use, up-to-date Python for your own projects, and the first setup is where most beginners get stuck: the wrong python command, SSL errors when installing packages, or VS Code running a different Python than the one you installed.
This is the exact setup I use on a Mac in 2026: Python 3.14 from python.org, Visual Studio Code, and your first program running in under 10 minutes. It works on Apple Silicon (M1 to M5) and supported Intel Macs.
Prefer to watch? Here's the full walkthrough:
1. Download Python from python.org
Go to python.org/downloads. The site detects macOS and offers the latest release as a universal installer (.pkg), which runs natively on Apple Silicon and Intel.
Use the official installer rather than whatever python3 happens to be on your Mac. You get the current version, pip, IDLE, and a clean place to install packages.
2. Run the installer
Open the downloaded .pkg and click through: Continue → Agree → Install, then enter your Mac password. When it finishes, Finder opens the new Python 3.14 folder in Applications. Don't close it yet.
3. Install the security certificates (don't skip this)
In that Python 3.14 folder, double-click Install Certificates.command. A Terminal window runs for a few seconds and installs the root certificates Python uses for HTTPS.
If you skip it, your first pip install or any HTTPS request from Python can fail with:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]
This one step prevents the most common "Python on Mac" error.
4. Verify Python and pip in Terminal
Open Terminal and run:
python3 --version
python3 -m pip --version
You should see Python 3.14.x and a pip version that points into the 3.14 framework. Two things to know:
- On macOS, the command is
python3, notpython. Typingpythonusually givescommand not found. - Prefer
python3 -m pipover plainpip. It guarantees you install packages for the same Python you're running.
5. Install Visual Studio Code
Download VS Code from code.visualstudio.com, unzip it, and drag it into Applications. Running it from the Downloads folder causes update problems later.
6. Add the Python extension and pick the interpreter
In VS Code, open Extensions (Cmd + Shift + X), search Python, and install the official one published by Microsoft. It brings syntax highlighting, IntelliSense, debugging and the run button.
Then tell VS Code which Python to use:
- Press
Cmd + Shift + P - Type Python: Select Interpreter
- Choose Python 3.14 (the one from
/Library/Frameworks/Python.framework/...)
This is the step people miss when "it works in Terminal but not in VS Code": VS Code was simply using a different Python.
7. Write and run your first program
Create a folder for your code (I use the Desktop for this first test), open it in VS Code, and add a file called hello.py:
name = input("What's your name? ")
print(f"Hello, {name}! Python is running on your Mac.")
Click the ▶ Run button at the top right, or run it from Terminal:
cd Desktop
ls
python3 hello.py
If it asks your name and greets you back, your setup is done.
Common problems and quick fixes
| Problem | Fix |
|---|---|
zsh: command not found: python |
Use python3. |
CERTIFICATE_VERIFY_FAILED when installing packages |
Run Install Certificates.command from the Python 3.14 folder in Applications. |
pip: command not found |
Use python3 -m pip install <package>. |
| VS Code says a module is missing, but Terminal works |
Cmd + Shift + P → Python: Select Interpreter → choose 3.14. |
can't open file 'hello.py' |
You're in the wrong folder. Use cd to go to where the file is, and ls to check it's there. |
One habit to start now: a virtual environment per project
Before you install packages for a real project, give it its own environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install requests
Inside an activated environment, python and pip work, and each project keeps its own packages without breaking the others. VS Code detects .venv automatically and offers it as the interpreter.
Where to go next
Once this works, you're ready to build something real. I made two beginner projects on the channel:
- Build a Chatbot in Python from Scratch (no API keys)
- Build a Real Banking REST API in Python from Scratch
Which part of the setup tripped you up the first time? Tell me in the comments.
Top comments (0)