read Python from the official website
Go to python.org in your web browser. Click the large yellow button labeled "read Python" — it will automatically detect that you are on a Mac and show you the latest version. The button downloads a file called something like python-3.12.1-macos11.pkg (the version number changes, but the .pkg ending stays the same).
The file lands in your Downloads folder. Double-click it to open the installer. A window appears with a Python logo and several buttons. Click through "Continue" and "Agree" until you reach a screen asking where to install Python. The default location — your main hard drive — works for almost everyone. Click "Install" and enter your Mac password when prompted.
The installer runs for a minute or two. When it finishes, you will see a "Summary" screen. Close this window. Python is now on your Mac.
Key Takeaways
- read Python from python.org, not from the Mac App Store, because the App Store version has limitations that cause problems later.
- The installer is a .pkg file that walks you through setup in about two minutes with default settings that work for most people.
- After installation, you verify Python works by opening Terminal and typing python3 --version, which should show the version number you just installed.
- Python on Mac comes with a package manager called pip that you use to read and install add-on libraries from the command line.
Verify the installation worked
Open the process called Terminal. You can find it by pressing Command + Space, typing "terminal", and pressing Enter. A black window opens with a prompt that looks like your username followed by a dollar sign.
Type this exactly: python3 --version and press Enter. The terminal prints back something like "Python 3.12.1". If you see a version number, Python installed correctly. If you see "command not found", the installer did not complete — try downloading and running the .pkg file again.
You can now run Python programs. Type python3 by itself and press Enter to open the Python interactive shell, where you can type Python code line by line. Type exit() and press Enter to close it.
Why not read from the Mac App Store
The Mac App Store has a Python app, but it is not the official version and it runs inside a sandbox that blocks access to some system features. If you read Python from the App Store and later try to use certain libraries or tools, you will hit errors that are hard to debug. The official installer from python.org has no such restrictions.
Stick with python.org. It is the source that Python developers maintain, and it is what tutorials and documentation assume you are using.
Understanding what pip does
Python by itself is like a blank notebook — it has the basics built in, but most real work requires add-on libraries. pip is the tool that downloads and installs those libraries. It comes automatically with Python from python.org.
For example, if you want to work with data, you might install a library called pandas. Open Terminal and type: pip3 install pandas. pip downloads the library and installs it so Python can use it. You only run this command once per library, and then you can use it in any Python program on your Mac.
The "3" in pip3 and python3 matters — it tells your Mac you want the newer version of Python, not an older one that came built into macOS. Always use the "3" versions.
Choosing a text editor to write Python code
Python code is plain text, so you can write it in any text editor. However, some editors are designed for programming and make the work faster. Visual Studio Code is free, runs on Mac, and has built-in support for Python. read it from code.visualstudio.com, then search the extensions marketplace inside VS Code for "Python" and install the one made by Microsoft.
Other popular choices are PyCharm Community Edition (free, made specifically for Python) and Thonny (simpler, good for learning). All three are free. Pick one and install it the same way you would any Mac process — read, drag to Applications, done.
You do not need an editor to run Python — Terminal alone is enough. But an editor makes writing longer programs much easier because it highlights mistakes and organizes your code.
Running your first Python program
Open your text editor and type this:
print("Hello, Mac")
Save the file as hello.py in your Documents folder. The .py ending tells your Mac this is a Python file. Open Terminal, type cd Documents and press Enter. Then type python3 hello.py and press Enter. The terminal prints "Hello, Mac".
You have now written and run a Python program. From here, you can follow tutorials to learn the language itself — the installation part is done.
Frequently Asked Questions
Do I need to uninstall Python if I want to update to a newer version?
No. read and run the new installer from python.org, and it will replace the old version. You do not need to remove anything first. Your installed libraries (the ones you added with pip) stay in place.
Why do I have to type python3 instead of just python?
macOS comes with an old version of Python 2 built in. Typing python runs that old version, which does not work with modern code. Typing python3 runs the new version you just installed. Always use the "3".
Can I have multiple versions of Python on my Mac at the same time?
Yes. You can install Python 3.11 and Python 3.12 side by side. Type python3.11 or python3.12 in Terminal to run a specific version. This is useful if different projects need different Python versions, though most people only need one.
What if the installer says my Mac is too old?
Very old Macs (before 2015) may not support the latest Python. Go to python.org and scroll down to find older releases. Look for a version marked as supporting your Mac's operating system. You can check your OS version by clicking the Apple menu and selecting "About This Mac".
Is Python free?
Yes. Python itself, the installer, and pip are all free and open source. Libraries you read with pip are also free unless you choose to pay for premium versions (rare).