Python

Written & tested for accuracy by a developer (not AI)

Check If Python Is Installed

Does my Mac come with Python? How to check if Python is installed on Mac. Xcode Command Line Tools installs a system Python. How to check the default Apple macOS system Python.

Python may already be installed on your Mac. The system Python is the copy of Python that is installed by Apple's Xcode Command Line Tools. Apple's own developer utilities depend on it, which is both why it is there and why it is not intended for your work.

This guide shows how to check if a system Python is installed. But consider the system Python is there for Apple utilities, not for you, so you should install Python separately if you want to run Python programs or develop in Python.

Checking your Python installation is one step in setting up your Mac for development. See the Mac development setup guide.

Before you get started

You'll need a terminal application to check for Python. Apple includes the Mac terminal but I prefer Warp Terminal. Warp increases developer productivity, helping you remember easily-forgotten commands and adds AI troubleshooting. Download Warp Terminal now; it's FREE and worth a try.

Python latest version

The current Python version is 3.14 (3.14.6, released June 2026); Python 3.13 is still maintained. New releases of Python come yearly, typically in October. You can always check the latest at python.org, or see Download Python for Mac.

A system Python on macOS

Python is not pre-installed on macOS, though developers often find it on Macs. Here's why.

Pre-installed on older Macs

What is your macOS version? You should check the macOS version and upgrade macOS before you install Python.

You might have an older Mac. Prior to macOS 12.3, Macs came with Python 2.7 pre-installed. Don't use any Python 2 version for development.

The system stub

Apple's macOS will detect if you try to run python3 and offer to install the Xcode Command Line Tools if it is not already installed. On a Mac without the Command Line Tools, typing python3 opens a dialog offering to install the developer tools:

$ python3 --version
xcode-select: note: No developer tools were found, requesting install.

You'll need Xcode Command Line Tools for any software development on a Mac but you should not use the system Python that Apple installs.

Installed with Xcode Command Line Tools

You might have Python because developers commonly install Xcode Command Line Tools. It is necessary for almost any software development project. When you install Xcode Command Line Tools, Apple includes Python 3.9.6. That's an older version.

Some Apple development utilities depend on the system Python. You should not attempt to update or remove the system Python installed with Xcode Command Line Tools. Instead, install a newer Python to run Python programs or develop software. See the guide:

Check if a system Python is installed

You can check to see if your Mac already has Python.

$ python --version
zsh: command not found: python

You'll see zsh: command not found: python if Python is not available.

Try python3 --version and which -a python3 to check if Python was installed with Xcode Command Line Tools.

$ python3 --version
Python 3.9.6
$ which -a python3
/usr/bin/python3

If you have Python 3.9.6 installed at /usr/bin/python3, you likely have the system Python installed by Xcode Command Line Tools. You can confirm this with xcode-select -p which will show if Xcode Command Line Tools is installed.

$  xcode-select -p
/Library/Developer/CommandLineTools

Why python3 works but python does not

Apple includes python3 ("python three") with Xcode Command Line Tools and offers no plain python command at all. Depending on how you install Python, you may get commands for either python or python3. As a developer, you'll want to simply enter python when you are working on a Python project. See the article Mac Python PATH to learn how to set up python with a shell configuration file.

What happens if you use a system Python

You can use the system Python 3.9.6 for simple scripts or command-line utilities. To avoid the error zsh: command not found: python some developers set an alias python3 to python to use the system Python. Really, it is better to install Python with UV and avoid the system Python entirely.

In the past, using the system Python to run user-installed Python programs or develop software led to dependency conflicts and could pollute or break the system Python. Now, recent versions of the Pip package manager make it difficult to install packages into the system Python. If you install packages with the system Python (using pip3 install or python3 -m pip install), you'll see a message Defaulting to user installation because normal site-packages is not writeable and a copy of Python 3.9 will be created in /Users/username/Library/Python/3.9/. Any packages you install will be saved in a "user Python" folder /Users/username/Library/Python/3.9/lib/python/site-packages. But you can't use these packages unless you set the Mac PATH for Python to use these packages. In general, using the system Python for installing and running programs or developing software quickly gets complicated and messy. Now most developers prefer to install Python with UV and set up a proper development environment for programming.

In short, don't use the system Python even if it is installed. It is for the system, not you.

Other Python versions

The commnd which -a will show if any Python version is installed.

$ which -a python
/Users/daniel/.local/bin/python

The which -a command shows the path to the Python executable (in this case, the version installed with UV).

To learn about the best way to install and use Python, see the article:

Install Python

See the guide How to Install Python on Mac for a discussion of options, or Download Python for Mac if you want the official installer. Here's my recommendation:

Uninstall Python

You can Uninstall Python on Mac to remove the versions you do not want. But be sure you do not remove the system Python, which macOS needs.

Continue setting up your Mac

Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.