python/cpython
Developer ToolsThe reference implementation of the Python language, aimed at developers who want to build, test, or contribute to Python itself.
What this repository is
This is CPython, the reference implementation of the Python programming language, currently at 3.16.0 alpha 1+dev on main. Most people install Python through python.org rather than from this source tree; the repository is the place to build the interpreter yourself, test it, and send changes upstream. Released documentation lives at docs.python.org, and the developer guide covers contribution workflows, build dependencies, and the test suite.
Build from source on Unix, Linux, BSD, macOS, and Cygwin
Prerequisites are platform-specific: you need the compiler and the third-party libraries that individual extension modules require. The build dependencies section of the developer guide lists what current Linux distributions and macOS need. Then, from the repository root:
./configure
make
make test
sudo make install
This installs the interpreter as python3. make test runs the test suite and prints a summary; skipped tests for unavailable optional features are normal. For an optimized interpreter, run ./configure --enable-optimizations before make to enable PGO (and LTO where supported), or add --with-lto for link-time optimization. To keep a debug build separate, create a subdirectory and invoke configure there (mkdir debug && cd debug && ../configure --with-pydebug && make && make test); this conflicts with a previous in-tree build until you run make clean at the top level.
Windows and macOS have their own build notes: see PCbuild/readme.txt for Windows and Mac/README.rst for macOS framework and universal builds. If a test fails and looks like a Python bug rather than an environment problem, re-run it verbosely (make test TESTOPTS="-v test_os test_gdb") and report it on the issue tracker with the output.
Installing alongside existing Pythons
Use make install for the version that should own ${prefix}/bin/python3, and make altinstall for every other version sharing the same prefix. altinstall installs versioned executables and files, so multiple versions can coexist.
Constraints
- The build needs platform toolchains and optional dependencies; not all standard library modules build or work on every platform.
- The license is not a single SPDX identifier in the repository metadata. The distribution contains no GPL code, so it can be used in proprietary projects, but some interfaces to GNU code are optional; check LICENSE for the full terms.
- Release timing is documented in PEP 826; changes in this tree are for an alpha release and may differ from stable Python.
- Most users should install a released Python rather than build
main; this source tree serves people who want 3.16 pre-release behavior, work on the interpreter, or test changes.
HotRepo's take
The stronger signals around this repository concern language development rather than repository upkeep. The March 2024 submission on disabling the GIL drew heavy discussion, including links to the design work and Sam Gross's projects (comment, PEP 703 clarification): it marks free-threaded execution as an active direction. Commenters also compared it with external accelerators and alternative language implementations (thread), which frames CPython's performance work as a different track from ecosystem add-ons rather than a replacement. Earlier threads like the 2017 move to GitHub are historical and do not describe the current contribution workflow. On HotRepo's daily ranking for 2026-11-01, the project was #17 on the all-language list with a language-specific Python list entry and 47 stars gained that day; that single snapshot supports only the day's position, not a trend.
Written by AI from the project's README, updated . The project's own docs are the source of truth.