# python-build-standalone: Pre-built Python Distributions


python-build-standalone is a project that produces self-contained, portable [CPython](https://pydevtools.com/handbook/explanation/what-is-python.md) distributions for macOS, Linux, and Windows. Gregory Szorc created the project; [Astral](https://astral.sh/), now part of OpenAI, maintains it. When [uv](https://pydevtools.com/handbook/reference/uv.md) runs `uv python install`, the binary it downloads comes from python-build-standalone.

{{< callout type="info" >}}
Most developers interact with python-build-standalone indirectly through uv. The project matters when debugging platform-specific interpreter issues or understanding where managed Python installations come from.
{{< /callout >}}

## What the distributions contain

Each distribution is a complete CPython installation: the {{< term "interpreter" >}}, the [standard library](https://docs.python.org/3/library/), header files for building C extensions, and pip. Dependencies like OpenSSL, SQLite, and zlib are statically linked or bundled, so the distributions need only a C library (glibc or musl on Linux) from the host system.

The install-only archives that uv downloads use the fastest available build configuration (typically PGO+LTO optimized) and weigh 30-60 MB compressed per platform.

## Platform and architecture coverage

| Platform | Architectures |
|---|---|
| macOS | x86-64, ARM64 (Apple Silicon) |
| Linux (glibc) | x86-64, ARM64, and x86-64 microarchitecture tiers (v2, v3, v4) |
| Linux (musl) | x86-64, ARM64 |
| Windows | x86-64, ARM64 (Python 3.11+) |

Linux glibc builds target glibc 2.17 or newer, covering most distributions released after 2014. The x86-64 microarchitecture tiers (v2, v3, v4) use newer CPU instruction sets for better performance; the baseline x86-64 build maximizes portability.

## Build variants

A single CPython version ships in several configurations:

- **PGO+LTO** is the default for install-only archives. Profile-guided optimization and link-time optimization produce the fastest interpreter.
- **Free-threaded** builds (CPython 3.13+) remove the [GIL](https://pydevtools.com/handbook/explanation/what-is-the-gil.md). uv installs them with the `t` suffix: `uv python install 3.14t`.
- **Debug** builds include runtime assertions and are useful for extension module development.
- **Static musl** builds link everything statically, producing a fully self-contained binary that cannot load dynamically linked C extensions.

## Downstream consumers

python-build-standalone is the Python distribution source for:

- [uv](https://pydevtools.com/handbook/reference/uv.md) (automatic download on `uv python install` and `uv run`)
- [mise](https://pydevtools.com/handbook/reference/mise.md) (default Python backend)
- [Rye](https://github.com/astral-sh/rye) (predecessor to uv's Python management)
- [Bazel rules_python](https://github.com/bazelbuild/rules_python) (hermetic Python toolchains)
- [PyApp](https://ofek.dev/pyapp/) (self-contained application launchers)

## How uv uses the distributions

uv maintains a catalog of available python-build-standalone releases. `uv python install 3.14` resolves to the latest patch release for that minor version, downloads the PGO+LTO install-only archive for the current platform, and unpacks it to `~/.local/share/uv/python/` (or `%APPDATA%\uv\python\` on Windows). Subsequent `uv run` and `uv sync` commands select a managed interpreter automatically when it satisfies the project's `requires-python`.

List installed managed interpreters with:

```bash
uv python list --managed-python --only-installed
```

## Known limitations

- **musl/Alpine compatibility.** Dynamically linked musl builds work on Alpine Linux but cannot load glibc-based C extensions. Fully static musl builds cannot load any dynamically linked extensions. This affects packages with C components like NumPy or cryptography.
- **Build-time path references.** Some build artifacts retain references to the original build-time paths. This rarely matters in practice but can surface when building C extensions that inspect `sysconfig` paths.
- **libedit instead of readline on Linux.** Linux distributions bundle libedit rather than GNU readline, which can cause minor differences in REPL key bindings and history behavior.
- **32-bit ARM.** Builds exist for armv7 (Raspberry Pi), but uv's libc detection has had issues on some 32-bit ARM setups. See [How to install uv on 32-bit Raspberry Pi OS](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-32-bit-raspberry-pi-os.md).

## Cons

- Not a package manager. python-build-standalone only produces interpreter binaries. Installing packages, managing virtual environments, and resolving dependencies requires a separate tool like [uv](https://pydevtools.com/handbook/reference/uv.md) or [pip](https://pydevtools.com/handbook/reference/pip.md).
- Larger than system packages. A bundled distribution includes OpenSSL, SQLite, and other libraries that a system package manager would share across programs.
- Release lag. New CPython patch releases appear in python-build-standalone within days, not hours. A `uv python install` command may briefly resolve to the previous patch while the new build is in progress.
