Python implementations#

The Python programming language has been implemented in different executables and runtime environments.

CPython#

CPython is the reference implementation written in C and Python. It is the most wide-spread and de-facto standard Python executable. Almost all of the time “Python interpreter” refers to the CPython implementation. And most of the time it’s more than enough to work with CPython.

Alternative implementations#

It is important to keep in mind that alternative Python implementations exist. They may provide a speedup or other benefit depending on your specific usecase or environment. On the downside they do not always support all features of CPython and may not support all packages.

PyPy#

The PyPy implementation is written in a restricted subset of Python called RPython (Restricted Python). It often runs faster than CPython because it’s a just-in-time compiler instead of an interpreter. On the downside there are also differences compared to CPython, in particular when using C extensions.

IronPython, Jython#

IronPython is a Python implementation written in .NET, whereas Jython is implemented in Java. These variants are useful if you need to combine Python with existing .NET or Java code.

Brython, Pyodide#

Brython (Browser Python) is a rather exotic implementation that allows to run Python code directly in the browser by translating it into Javascript. Pyodide brings Python and various scientific libraries to the browser using WebAssembly.

MicroPython, CircuitPython#

MicroPython and CircuitPython are Python implementations optimized to run on microcontrollers.

Note

From now on we always mean the CPython reference implementation when refering to the Python interpreter. As this is the de-facto standard for most users, it simplifies the discussion by not having to think about possible deviations when using other implementations.