# 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](https://pydevtools.com/handbook/reference/uv.md), 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:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Open a new terminal window afterward so the updated `PATH` takes effect. For the [Homebrew](https://pydevtools.com/handbook/reference/homebrew.md) and pip install methods, see [how to install uv on macOS](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-macos.md).

## Install a Python version

Ask uv for the latest CPython:

```console
$ 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](https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv.md).

## Run Python without activating anything

Use `uv run` to launch the interpreter with its virtual environment wiring already in place:

```console
$ 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 `python3` at `/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](https://pydevtools.com/handbook/explanation/why-should-i-avoid-system-python.md).
- **`brew install python`.** Homebrew's Python runs Homebrew formulae fine, but it ships marked as externally managed, so `pip install` outside a virtual environment fails with [`externally-managed-environment`](https://pydevtools.com/handbook/how-to/how-to-fix-the-externally-managed-environment-error.md). It also upgrades on Homebrew's schedule, not yours. See [should I use Homebrew to install Python?](https://pydevtools.com/handbook/explanation/should-i-use-homebrew-to-install-python.md).
- **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.

## Learn More

- [How to Install Python (and Which Method to Choose)](https://pydevtools.com/handbook/how-to/how-to-install-python.md)
- [How to Fix "zsh: command not found: python" on macOS](https://pydevtools.com/handbook/how-to/how-to-fix-python-command-not-found-on-mac.md)
- [How to install uv on macOS](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-macos.md)
- [How to install Python with uv](https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv.md)
- [How to fix the "externally-managed-environment" error](https://pydevtools.com/handbook/how-to/how-to-fix-the-externally-managed-environment-error.md)
- [Why should I avoid the system Python?](https://pydevtools.com/handbook/explanation/why-should-i-avoid-system-python.md)
- [Should I use Homebrew to install Python?](https://pydevtools.com/handbook/explanation/should-i-use-homebrew-to-install-python.md)
