How to Install Python on macOS
macOS makes Python confusing before you write a line of code. Type python and the shell answers command not found. Type python3 and you get Python 3.9.6, a version Apple froze years ago. Run brew install python, then pip install, and the first install fails with externally-managed-environment.
Skip all of it. Install one tool, uv, and let it download and manage Python for you. The same steps work whether you have never installed Python or already have three copies fighting over your PATH.
Install uv, then let it manage Python
Install uv first. The standalone installer needs no existing Python:
curl -LsSf https://astral.sh/uv/install.sh | shOpen a new terminal window afterward so the updated PATH takes effect. For the Homebrew and pip install methods, see how to install uv on macOS.
Install a Python version
Ask uv for the latest CPython:
$ uv python install
Installed Python 3.14.6 in 871ms
+ cpython-3.14.6-macos-aarch64-none
uv pulls a prebuilt binary into its own user-owned directory. It needs no sudo, and it leaves /usr/bin/python3 and anything Homebrew installed untouched. Pass a version to pin one: uv python install 3.12. For patch pinning, PyPy, and free-threaded builds, see how to install Python with uv.
Run Python without activating anything
Use uv run to launch the interpreter with its virtual environment wiring already in place:
$ uv run --python 3.13 python -c "import sys; print(sys.version)"
3.13.13 (main, Apr 14 2026, 14:32:41) [Clang 22.1.3 ]
Inside a project, uv run python picks up the version recorded for that project, so different projects run different Pythons without conflict.
Skip these three install paths
Three Pythons a beginner tends to reach for on macOS, and why to leave each alone:
- The system
python3at/usr/bin/python3. It exists for Apple’s own tools and stays frozen at an old version (3.9.6 on current macOS). Installing packages into it can break OS utilities. See why you should avoid the system Python. brew install python. Homebrew’s Python runs Homebrew formulae fine, but it ships marked as externally managed, sopip installoutside a virtual environment fails withexternally-managed-environment. It also upgrades on Homebrew’s schedule, not yours. See should I use Homebrew to install Python?.- pyenv. pyenv compiles each version from source, which is slower and needs a build toolchain. uv downloads prebuilt binaries and manages project dependencies in the same step, so a separate version manager is redundant.