# How to install Python with uv

[uv](https://pydevtools.com/handbook/reference/uv.md) downloads and installs Python interpreters on demand, so you usually don't need to install Python explicitly. Run `uv python install` ahead of time to make a version available offline or to put it on your PATH. uv pulls prebuilt CPython binaries from [python-build-standalone](https://github.com/astral-sh/python-build-standalone), so installs don't need admin privileges and don't replace [system Python](https://pydevtools.com/handbook/explanation/why-should-i-avoid-system-python.md) or interpreters managed by [Homebrew](https://pydevtools.com/handbook/reference/homebrew.md) or [pyenv](https://pydevtools.com/handbook/reference/pyenv.md).

The same commands work on macOS, Linux, and Windows. You only need [uv installed](https://pydevtools.com/handbook/how-to/how-to-install-uv.md) first.

> [!WARNING]
> If your uv installation predates the eMudhra certificate fix, follow the [incident update checklist](https://pydevtools.com/blog/emudhra-ca-compromise-python-updates.md) before using it to download Python. An affected uv may still trust the compromised certificates during the download.

## Install the latest stable CPython

```console
$ uv python install cpython
Installed Python 3.15.2 in 13.91s
 + cpython-3.15.2-linux-x86_64-gnu (python3.15)
```

The explicit `cpython` target downloads the latest stable CPython release into uv's managed Python directory. A bare `uv python install` first reads `UV_PYTHON`, `.python-versions`, or `.python-version`; without a request, it accepts an existing managed Python installation and downloads the latest stable release only when none is installed.

After installation, `uv run` and `uv sync` can use this interpreter when it satisfies the project's Python requirement.

## Install a specific version

Pass a minor or exact patch version:

```console
$ uv python install 3.12
$ uv python install 3.12.16
```

Listing several versions installs them in one pass:

```console
$ uv python install 3.11 3.12 3.13
```

If you only care about staying current on patch releases for versions you already have, see [how to keep Python up to date with `uv python upgrade`](https://pydevtools.com/handbook/how-to/how-to-keep-python-up-to-date-with-uv-python-upgrade.md). To point an existing project at one of these versions, see [how to change the Python version of a uv project](https://pydevtools.com/handbook/how-to/how-to-change-the-python-version-of-a-uv-project.md).

## List installed and available versions

```console
$ uv python list
```

The output marks downloadable versions as `<download available>` and shows the path of every interpreter already on disk, including those uv discovered outside its own install directory (system Python, Homebrew, [pyenv](https://pydevtools.com/handbook/reference/pyenv.md), and so on). `--only-installed` drops the downloadable entries but keeps discovered interpreters such as Homebrew's. To restrict the list to the ones uv manages:

```console
$ uv python list --managed-python --only-installed
```

## Verify the install runs

Use `uv run` to launch a managed Python with the right [virtual environment](https://pydevtools.com/handbook/explanation/what-is-a-virtual-environment.md) wiring:

```console
$ uv run --python 3.14 python -c "import platform; print(platform.python_version())"
3.14.10
```

The command selects the installed Python 3.14 interpreter explicitly.

## Make a uv-managed Python the default `python` command

By default, `uv python install` writes versioned shims like `python3.13` into uv's bin directory. Pass `--default` to also write `python` and `python3`:

```console
$ uv python install --default 3.13
```

Once that bin directory is on your PATH, `python` resolves to the uv-managed interpreter. See [how to add Python to your system PATH with uv](https://pydevtools.com/handbook/how-to/how-to-add-python-to-your-system-path-with-uv.md) for the PATH setup.

## Uninstall a version

```console
$ uv python uninstall 3.12.16
```

Pass a minor version to remove every installed patch at once:

```console
$ uv python uninstall 3.12
```

## Answer common questions

### Does `uv python install` need admin privileges?

No. uv downloads to its user-owned data directory (e.g., `~/.local/share/uv/python` on Linux and macOS, `%LOCALAPPDATA%\uv\python` on Windows), so installs never need `sudo` or an elevated shell.

### Will it interfere with system Python or Homebrew Python?

No. uv-managed interpreters live in a separate directory. Existing `python` commands on your PATH keep working until you opt in with `--default` and add uv's bin directory to PATH.

### How is this different from pyenv?

Both tools install multiple Python versions side by side, but uv downloads prebuilt binaries (no compiler toolchain needed) and ties Python installation into the project workflow that handles dependencies and lockfiles. See [how do pyenv and uv compare for Python interpreter management?](https://pydevtools.com/handbook/explanation/how-do-pyenv-and-uv-compare-for-python-interpreter-management.md).

### Can I install PyPy or free-threaded CPython?

Yes. Use `uv python install pypy@3.11` for PyPy. For the [free-threaded build](https://pydevtools.com/handbook/how-to/how-to-use-free-threaded-python-in-a-uv-project.md), append a `t` to the version (`uv python install 3.13t`).

## Explore related guides

- [uv: A Complete Guide](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) covers what uv does, how fast it is, the core workflows, and recent releases.
- [How to keep Python up to date with `uv python upgrade`](https://pydevtools.com/handbook/how-to/how-to-keep-python-up-to-date-with-uv-python-upgrade.md)
- [How to change the Python version of a uv project](https://pydevtools.com/handbook/how-to/how-to-change-the-python-version-of-a-uv-project.md)
- [How to switch from pyenv to uv for managing Python versions](https://pydevtools.com/handbook/how-to/how-to-switch-from-pyenv-to-uv-for-managing-python-versions.md)
- [How to add Python to your system PATH with uv](https://pydevtools.com/handbook/how-to/how-to-add-python-to-your-system-path-with-uv.md)
- [What is a `.python-version` file?](https://pydevtools.com/handbook/explanation/what-is-a-python-version-file.md)
- [Why should I avoid 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)
