Cython Speedups
Installing Python extension
PyCharm's debugger is written in Python. Python is an interpreted language, which means that instructions have to be translated to machine code as the code is being run.
This costs time, and therefore it is not as fast as the compiled code. Thankfully, Python supports compiled C-extensions through Cython. PyCharm ships with C versions of debugger code, which you can compile to make debugging in PyCharm faster.
If you have a large code base, using this speedup extension is reasonable.
The actions required to get additional speedups depend on your platform:
- *NIX
When you start the debugger session, the notification popup appears. Click the Install link in the popup.
- macOS and Windows
You do not need to do anything. We've bundled precompiled extensions, so you are already using them.
Reported Problem | Possible cause | Solution |
|---|---|---|
The following error message is shown:
| You lack header files and static libraries for Python. | Use your package manager to install the On Linux, you can run the following command:
sudo apt-get install python-dev
To install the package for specific Python version, use
sudo apt-get install python3.11-dev
|
The following error message is shown:
| You lack a C compiler. | Install a C compiler in order to build Cython extensions for the debugger. For more information, refer to the Cython documentation. |
Using Cython Speedups without PyCharm UI
If you want to manually compile Cython speedups, do not use the PyCharm UI.
On Ubuntu, use the following command:
Where <PYCHARM_INSTALLATION_PATH> is the path to the local PyCharm installation directory, for example, /opt/pycharm-2025.3.