Installing Cython
Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex).
Installing Cython
Many scientific Python distributions, such as Anaconda [Anaconda], Enthought Canopy [Canopy], and Sage [Sage], bundle Cython and no setup is needed. Note however that if your distribution ships a version of Cython which is too old you can still use the instructions below to update Cython.
Unlike most Python software, Cython requires a C compiler to be present on the system. The details of getting a C compiler varies according to the system used:
- Windows A popular option is to use the open source MinGW (a Windows distribution of gcc). See the appendix for instructions for setting up MinGW manually. Enthought Canopy and Python(x,y) bundle MinGW, but some of the configuration steps in the appendix might still be necessary. Another option is to use Microsoft’s Visual C. One must then use the same version which the installed Python was compiled with.