On this page
The best Python interpreter depends on your goal. CPython is the default and the most compatible choice, PyPy targets speed, Jython runs on the Java Virtual Machine, IronPython and Python.NET connect Python to .NET, and Stackless Python adds lightweight concurrency.
Key takeaways
- Python is a language specification, and each interpreter is a different implementation of it.
- CPython is the reference implementation and works with the widest range of packages and C extensions.
- PyPy, Jython, IronPython, Python.NET and Stackless Python each serve a narrower need.
- New projects should use Python 3, and Python 2 should be kept only for legacy code that cannot yet move.
- Trying more than one interpreter is useful, especially in professional work.
What is a Python interpreter?
An interpreter is a program that executes instructions written in a programming or scripting language directly, without first requiring the whole program to be compiled into a machine-language program.
Python itself is a specification rather than a single program. Every implementation of the language includes an interpreter, and the choice among them affects performance, platform support and library compatibility. The Stack Overflow developer survey of 2020 listed Python among the fastest-growing languages, so there is no shortage of options.
Which Python interpreters are most popular?
The table below summarizes six widely used interpreters, followed by a closer look at each.
| Interpreter | Runs on | Best known for |
|---|---|---|
| CPython | Native (written in C) | Default, reference implementation with the best compatibility |
| IronPython | .NET | Using .NET libraries from Python |
| Jython | Java Virtual Machine | Using Java classes from Python |
| PyPy | Native, with a JIT compiler | Faster execution of some Python code |
| Python.NET | .NET CLR with a native Python install | Embedding .NET access in standard Python |
| Stackless Python | Native (C and Python) | Microthreads and channels |
CPython
CPython is the default interpreter and the most widely used. It is written in C and provides an interface for working with C and other languages. It first compiles Python source into bytecode and then interprets that bytecode.
CPython uses a Global Interpreter Lock (GIL), which prevents multiple Python threads in one process from running Python bytecode at the same time. This can limit multithreaded performance.
As the reference implementation, CPython offers the greatest compatibility with Python packages and C extension modules. It is the only practical option for packages that depend on C extensions, and targeting it reaches the broadest audience.
IronPython
IronPython is an implementation of Python for the .NET framework. It can use both Python and .NET libraries, and it can expose Python code to other .NET languages. It supports dynamic compilation and includes an interactive console.
It lets Python scripts work with .NET objects, and Python Tools for Visual Studio integrates it into the Visual Studio IDE.
Jython
Jython, formerly called JPython, is an implementation of Python that runs on the Java platform. It translates Python code into Java bytecode, so Python code can run on any machine that has a Java Virtual Machine.
Jython can import and use Java classes as if they were Python modules. It suits projects that must interface with an existing Java codebase or that want to write Python for the JVM.
PyPy
PyPy is a fast, compatible alternative implementation of Python. The interpreter is written in RPython, a restricted, statically typed subset of Python, and it includes a just-in-time (JIT) compiler.
Its main goal is to stay highly compatible with CPython while improving performance. Developers typically use it to speed up specific Python code. As of 2021, the PyPy website described it as about four times faster than CPython on average, though real results vary by workload.
Python.NET
Python.NET (also written PythonNet) integrates a native Python installation with the .NET Common Language Runtime. Its approach is the reverse of IronPython’s: instead of reimplementing Python on .NET, it brings .NET into standard Python.
Together with Mono, it lets a native Python install on a non-Windows system work with the .NET framework. It can also be used alongside IronPython.
Stackless Python
Most interpreters, CPython included, use the C stack to manage Python function calls. Stackless Python avoids this by clearing the C stack between calls, so Python execution does not depend on it. Like CPython, it is written in C and Python.
It supports threads, communication channels, coroutines and task scheduling. Its best-known feature is microthreads, which avoid much of the overhead of ordinary operating system threads.
Should you use Python 3 or Python 2?
Use Python 3 for new work. Python 3 was introduced in 2008, and beginners should start with it. The choice is harder for organizations with large Python 2 codebases, which is why migration was slow for years.
Python 2.7 stopped receiving security updates at the start of 2020. Staying on it is reasonable only if you maintain an existing Python 2 codebase or depend on a library that has not been ported. Even then, planning a move to Python 3 is wise.
When writing a new open-source library, supporting both versions made sense at the time of the original article because many developers still used Python 2. Whichever version you use, prefer the latest Python 3.x release, since each one brings bug fixes, security improvements and standard library updates.
Frequently asked questions
What is the default Python interpreter?
CPython is the default and reference interpreter, and it is the one most people install when they download Python.
Which Python interpreter is the fastest?
PyPy is designed for better performance than CPython through its JIT compiler. Speed gains depend on the workload, so test your own code.
Can Python run on Java or .NET?
Yes. Jython runs Python on the Java Virtual Machine, while IronPython and Python.NET connect Python with the .NET framework.
Is Python 2 still supported?
No. Python 2.7 stopped receiving security updates at the start of 2020, so new projects should use Python 3.
Conclusion
Each of these six interpreters has its strengths, and any of them can be used. CPython is the safest default, while the others fit specific needs such as speed, Java or .NET integration, or lightweight concurrency. Having more than one interpreter available is a good habit, particularly in professional work.



