Highly redistributable builds of Python.
Introduction
Python Standalone Builds produces self-contained, highly portable Python distributions.
These Python distributions contain a fully usable, full-featured Python installation: most extension modules from the Python standard library are present, and their library dependencies are either distributed with the distribution or are statically linked.
The Python distributions are built in a manner to minimize run-time dependencies. This includes limiting the CPU instructions that can be used and limiting the set of shared libraries required at run-time. The goal is for the produced distribution to work on any system for the targeted architecture.
Some distributions ship with their build artifacts (object files, libraries, etc) along with rich metadata describing the distribution and how it was assembled. The build artifacts can be recombined by downstream repackagers to derive a custom Python distribution, possibly without certain features like SQLite and OpenSSL. This is useful for embedding Python in a larger binary. See the PyOxidizer sister project for such a downstream repackager.
Many users of these distributions might be better served by the PyOxy sister project. PyOxy takes these Python distributions and adds some Rust code for enhancing the functionality of the Python interpreter. The official PyOxy release binaries are single file executables providing a full-featured Python interpreter.
Obtain distribution
Pre-built distributions are published as releases on GitHub at https://github.com/astral-sh/python-build-standalone/releases.
Simply go to that page and find the latest release along with its release notes.
Download the Python version you need. Usually, you will use these versions:
cpython-*-x86_64-pc-windows-msvc-install_only_stripped.tar.gzcpython-*-x86_64-unknown-linux-gnu-install_only_stripped.tar.gzcpython-*-aarch64-apple-darwin-install_only_stripped.tar.gz
curl -O cpython-3.14.2.tar.gz https://github.com/astral-sh/python-build-standalone/releases/download/20251217/cpython-3.14.2+20251217-x86_64-pc-windows-msvc-install_only_stripped.tar.gztar xvf cpython-3.14.2.tar.gzExtract it to pyembed, make sure the file layout is as follows:
├── pyembed/python ├── python.exe ├── python3.dll └── ...