How to use Python on Mac: Complete beginner-friendly guide
- Python 3 is essential on Mac.
macOS includes Python 2 by default, but installing the latest Python 3 ensures access to modern features, updates, and compatibility with current libraries. - You can install Python with Homebrew or via the official installer.
You can quickly install or update Python using Homebrew (brew install python / brew upgrade python) or download the official installer from python.org. - Check your Python version easily.
Open Terminal and type python3 --version to verify which version is installed and confirm updates. - Choose the right editor for your workflow.
Editors like CodeRunner (lightweight IDE with debugging), PyCharm (full-featured Python IDE), and Sublime Text (minimal and fast) improve coding efficiency, while Dropzone helps automate repetitive tasks. - Start coding and automating tasks immediately with Setapp.
Python allows simple commands, conditional statements, and scripts to automate tasks, build web apps, or analyze data. Using Setapp apps like CodeRunner, Whisk, and Dropzone can make learning and coding faster and smoother. Try Setapp free for 7 days.
“Python’s simplicity is its greatest strength.” — Guido van Rossum (Python’s creator)
Python is one of the most accessible and widely used programming languages today. It’s popular among beginners because it’s easy to learn, and it’s powerful enough for advanced fields like data science and machine learning.
If you’re new to Python on macOS, you might wonder how to start coding, how to check or update your Python version, or which code editors work best on a Mac. This guide explains the essentials: how to install Python, how to run it, how to update it, and how to choose the right tools to begin coding on your Mac.
How do I install or update Python on my Mac?
You can install or update Python on a Mac using Homebrew or the official installer from python.org. macOS still includes an old system version of Python 2, so make sure you install and use the latest Python 3 instead.
Homebrew is the quickest way to get the current stable release (Python 3.12.x). It installs the newest version and makes updates easy. If you prefer, you can also download the official Python 3 installer from python.org.
How to check the current Python version
To check the current version of Python 3 on Mac:
Go to Finder > Applications > Utilities > Terminal.
Type python3 --version.
Press Return.
I have the latest Python version:

How to update to the latest Python version
If the version is outdated, you can install the latest Python 3 using either the official installer or Homebrew.
To use the official installer:
Go to python.org/downloads.
Download the latest Python 3.14.0 package.
Open the installer and follow the setup steps.

To use Homebrew:
Open Terminal and type brew update > Press Return.
To update the Python version, type brew upgrade python > Press Return.
After the upgrade process is complete, verify the newly installed Python version. Type python3 --version > Press Return.
If you don’t have Homebrew on your Mac, here’s a quick guide on how to install Homebrew.
Which Python editors work well on a Mac?
By default, .py files open in TextEdit, which is fine for quick edits but lacks syntax highlighting, debugging, and extensions. If you want a smoother coding experience, a dedicated editor or IDE will make a big difference.
There are plenty of great Python editors for macOS, depending on how simple or powerful you want your setup to be.
Popular editors include:
PyCharm
Sublime Text
Each editor supports essentials like debugging, syntax highlighting, and smarter code handling to help you work more efficiently. Next, I’ll show you recommended code editors and helpers.
CodeRunner: Versatile multi-language code editor with built-in debugging
CodeRunner follows standard coding conventions (auto-indent, completion, bracket handling) and includes built-in debugging, so you don’t need extra setup. It’s great if you want a lightweight Mac-native IDE that scales from small scripts to bigger projects. It's lightning-fast and supports 25 languages out of the box, including Python.

Whisk: Real-time web editor with instant live preview for front-end coding
While not a Python-specific editor, Whisk shines if you work with HTML, CSS, PHP, or JavaScript alongside your Python projects. It offers live previews, instant publishing, and integrations that make front-end work feel faster and more visual.

Also, check out the complete list of the best coding software for Mac to try in 2026.
PyCharm: Full-featured, Python-focused IDE for serious projects
A widely used, Python-focused IDE available in both free and paid versions. PyCharm is designed around a keyboard-driven workflow, with smart error checking, debugging tools, plugins, and web-development features.

Source: web.stanford.edu
Sublime Text: Minimal, ultra-fast editor with powerful customization
A flexible editor loved for its speed and minimalism. It works for Python, markup, and prose, and offers features like split editing and multiple selections. Sublime is lightweight enough for quick edits, yet customizable when you need more.

Source: sublimetext.com
(Bonus) Dropzone: Drag-and-drop automation tool that speeds up everyday developer tasks
Not a code editor, but a surprisingly useful utility for developers. Dropzone lets you create quick actions, shortcuts, and automations that run with a single trigger. The tool is ideal for repetitive tasks like moving files, uploading content, or running scripts. It’s one of those small additions that can eliminate a lot of manual steps in your workflow.

Read also:
How to use Python to start programming
To start programming in Python on your Mac:
- Open a code editor (I recommend CodeRunner).
- Make sure the editor is set to Python.
- If not, set it in the top left corner of the tool.

- Type print("Hello World") > Click Run. You’ll see Hello World appear in the output window.

- Python can also handle simple arithmetic. For example type print(10 + 10).
- Or create conditional statements:
weather = 100
if weather > 75:
print("It's hot outside")
else:
print("It's not hot outside")

These are just the most basic commands, but they form a great starting point for automating tasks and exploring Python further.
How do I run a Python script from Terminal on Mac?
To run a Python script on your Mac:
Open Terminal from Applications > Utilities.
Go to your script’s folder using the cd command. For example, type cd /path/to/your/script > Press Return.
Execute the script by typing python3 your_script.py > Press Return.
Your Python program will run directly in the Terminal, and any output will appear there.
What you can do with Python on Mac
Python is “simple” because its syntax is clear. You learn to read it quickly, so you spend less time wrestling with structure and more time writing code.
With Python, you can:
Write scripts to automate tasks
Build full-scale web applications
Analyze data for research or business insights
Python is open source and free to use, and gets regularly updated. And if you ever get stuck, Python’s expansive and supportive community is there to help you out.
Is Python free on Mac?
Yes, Python is open-source and completely free to use on Mac. You can download or install it through various methods without any licensing costs.
How to install Python on Mac: What I learned
From my experience, Python becomes much less intimidating when you start with the right development environment and tools. So make sure you learn in the proper environment of CodeRunner, with Whisk there to assist you with any HTML/CSS tasks and Dropzone to make repeating actions a breeze.
Best of all, CodeRunner, Whisk, and Dropzone are available to you absolutely free through the seven-day trial of Setapp , a platform with more than 260 top-of-the-line Mac apps for any task, from writing prose (Ulysses) to controlling your network traffic (TripMode). Try every Setapp app right now at no cost and find your new favorites to improve your daily productivity.
FAQ
Is Python already installed on my Mac?
Yes, macOS comes with Python 2.x pre-installed for compatibility. However, you’ll likely want to install the latest Python 3 version to access newer features and support.
How do I install or update Python 3 on Mac?
You can install or update Python using Homebrew (brew install python / brew upgrade python) or the official installer from python.org. After installation, check your version with python3 --version in Terminal.
Which code editors are best for Python on Mac?
Popular Python editors for Mac include CodeRunner (lightweight IDE with debugging), PyCharm (full-featured Python IDE), and Sublime Text (minimal and fast). For workflow automation, Dropzone speeds up repetitive tasks.
How do I run a Python script on a Mac?
To run a Python script:
- Open Terminal (Applications > Utilities).
- Go to the script folder using
cd /path/to/script. - Run
python3 your_script.py.
The output will appear directly in Terminal.
Is Python free to use on Mac?
Yes. Python is fully open-source and free on macOS. You can install it via multiple methods without licensing costs, and the community actively maintains updates and libraries.