Everywhere All articles Download Buy — $19

Where apps hide your files

Finding which Python your Mac runs

Updated 2026-10-28 · 6 min read

A Mac usually has several Pythons: Apple's launcher in /usr/bin, plus whatever you installed from python.org, Homebrew, pyenv or uv. Two Terminal commands tell you which one is running and where it lives.

Ask the Mac which Python it runs

There is usually more than one Python on a Mac, so start by asking which one your Terminal uses:

which -a python3
python3 -c "import os, sys; print(os.path.realpath(sys.executable))"

The first prints every python3 on your PATH, in search order. The second prints the real file of the one that runs, with symlinks followed (plain sys.executable can stop at a link such as /usr/local/bin/python3.11). Both are read-only. The first command's answer is one of these:

What you seeWhere it comes from
/usr/bin/python3Apple's stub, which hands over to Xcode or the Command Line Tools
/Library/Frameworks/Python.framework/Versions/3.x/bin/python3The installer from python.org
/opt/homebrew/bin/python3Homebrew on Apple silicon
/usr/local/bin/python3python.org symlinks, or Homebrew on an Intel Mac
~/.pyenv/shims/python3pyenv
a .venv/bin/python3 pathA virtual environment, which is a copy or link of one of the above

Apple's python3 is a stub, not a real install

/usr/bin/python3 is not Python itself. On the Mac used for this guide it is a 118,864-byte launcher, the same size as /usr/bin/git, and it passes your command to whichever developer tools xcode-select -p points at. Here that command prints /Applications/Xcode.app/Contents/Developer, and the real interpreter is inside Xcode.app:

/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9

(sys.executable reports it as /Applications/Xcode.app/Contents/Developer/usr/bin/python3, a link to that file.)

Without Xcode, the Command Line Tools provide it at /Library/Developer/CommandLineTools/usr/bin/python3, with its framework under /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/. Both were present here and both were version 3.9. On a Mac with neither installed, running python3 makes macOS offer to install the Command Line Tools (a standard macOS behaviour that was not tested here).

The python.org documentation says never to modify or delete this copy: it is Apple-controlled and used by Apple-provided and third-party software. It is usually an older version, and the legacy Python 2 command /usr/bin/python is not there on recent macOS (it is absent on the Mac used for this guide).

The python.org installer

The python.org macOS installer puts three things on the disk, according to the Python documentation:

The installer adds the framework location to your shell path, and the documentation says the installer's own python3 should be used instead of the system one. If it is not, check your PATH after installing, because the shell profile update may not have applied. The /Applications/Python 3.x folder also contains an Install Certificates.command that installs SSL certificates for that Python.

To remove it, the documentation says there are three things: the Applications folder, the framework and the /usr/local/bin symlinks. Move them to the Trash from Finder, and treat the symlinks with care: only remove the ones that point into Python.framework.

Homebrew

Homebrew keeps each Python under its Cellar and links the commands into its bin folder. The prefix is /opt/homebrew on Apple silicon and /usr/local on Intel. First check what is installed, then ask for the folder:

brew list --versions | grep python
brew --prefix python@3.12

brew --prefix prints the folder Homebrew would use (for example /opt/homebrew/opt/python@3.12) even when that version is not installed, so trust it only after the first command lists the version.

On the Mac used for this guide there is an Intel Homebrew whose /usr/local/bin/python3.11 is a link into a Cellar folder, and /usr/local/bin/python3.11 --version prints 3.11.9. The native /opt/homebrew has a python@3.10 in its Cellar but no python3 link in /opt/homebrew/bin, so which -a never shows it. A Python can be installed without being on your PATH.

Homebrew's own Python is also used by other Homebrew packages, so uninstalling it with brew uninstall may be refused while something depends on it. Let brew decide.

Version managers and uv

pyenv keeps its Pythons under ~/.pyenv/versions. The uv tool, if you use it, keeps managed Pythons in ~/.local/share/uv/python, which is where they were on the Mac used for this guide, in folders such as cpython-3.12.13-macos-aarch64-none. List them with uv python list --only-installed.

Apple silicon or Intel

A Python can be built for either chip. The check is python3 -c "import platform; print(platform.machine())", which prints arm64 or x86_64. If your Terminal runs under Rosetta, you can get x86_64 even on an Apple silicon Mac. Starting a command with arch -arm64 runs the native half of a universal binary, as with arch -arm64 /usr/bin/python3.

Packages and project folders

Installed packages are not inside the interpreter folder for virtual environments or for user installs. A .venv or venv folder inside a project holds that project's packages. For framework builds (Apple's, python.org's and Homebrew's), pip3 install --user puts files in ~/Library/Python/3.x/; for uv and pyenv builds it uses ~/.local. python3 -m site --user-base prints the folder for the Python you run. Deleting a virtual environment is safe in the sense that you can create it again, but anything you installed by hand is gone with it.

Why a normal search misses all this

Most of these folders are in /Library, /usr/local, app packages such as Xcode.app, or hidden dot-folders in your home folder. Finder and Spotlight searches leave all of those out, and the stub in /usr/bin is a hidden system file.

Finding every Python on the disk

When which -a does not tell the whole story, type python3.11 or Python.framework into Everywhere. It lists the matching executables and framework folders wherever they are, including inside Xcode.app, under ~/.local/share/uv and in old virtual environments. Check each result's folder column to see which install it belongs to, then press ⌘T to open a Terminal there. It matches file names, not the version printed inside.

Common questions

Where is Python installed on a Mac?

Run python3 -c "import os, sys; print(os.path.realpath(sys.executable))" to see the real file. It is typically inside Xcode or the Command Line Tools, /Library/Frameworks/Python.framework (python.org), or the Homebrew prefix.

What is /usr/bin/python3 on macOS?

It is a stub from Apple that hands over to the Python in Xcode or the Command Line Tools. The python.org documentation says never to modify or delete it.

Where does the python.org installer put Python?

In /Library/Frameworks/Python.framework, with an app folder in /Applications and symlinks in /usr/local/bin.

How do I find the Homebrew Python path?

Run brew list --versions | grep python to see which versions are installed, then brew --prefix python@3.12 (with your version) for its folder. On Apple silicon the prefix is under /opt/homebrew.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support