cpython (python/cpython)

Searching Database…

What is this?This is the official source code repository for CPython, the reference implementation of the Python programming language, written mainly in C.
Is this a library I import, or the actual Python interpreter?It's the interpreter itself - the C source code that gets compiled into the python3 binary you run, not a package you install into a project.
How do I build Python from this source?On Unix, Linux, BSD, macOS or Cygwin run './configure', 'make', 'make test', then 'sudo make install'. Windows builds are covered separately in PCbuild/readme.txt.
Do I need extra libraries installed to build it?Yes - a complete build needs various third-party libraries depending on your platform and configure options, and not every standard library module builds on every platform.
Is this a stable release I should use day to day?No, this branch currently tracks Python 3.16.0 alpha 0, a pre-release development version, not a production-ready build.
Which operating systems can I actually build this on?Unix, Linux, BSD, macOS and Cygwin are covered by the standard configure/make flow, and Windows has its own build path documented in PCbuild/readme.txt.
Can I use this in a closed-source product?Yes - the PSF license covers CPython and the distribution contains no GPL code, so it can be used in proprietary projects.
Can I keep this alongside my existing Python install?Yes - use 'make altinstall' for secondary versions so they coexist by major.minor version, and reserve 'make install' for the one version you want as the primary python3.
Can I make the build run faster at runtime?Running './configure --enable-optimizations' turns on Profile Guided Optimization and can auto-enable Link Time Optimization, producing a faster binary at the cost of a longer build.
How do I verify my build actually works?Run 'make test' from the top-level directory; resource-heavy tests are skipped by default unless you run 'make buildbottest'.
Where can I read the official docs?Documentation for the current Python version is published online and updated daily, and can be downloaded in HTML, EPUB, or reStructuredText formats.
What are similar projects?php-src, mquickjs, v, spinel, i3, Odin, ruby, lua
Creator
python
Size
899.2 MB
Stars
78.4K
Updated
CommitNov 18
Age
9y
Commits · 90 Days