Installing Cython
In order to use Cython, we need to install Cython. Enthought and Sage have Cython included. For more information, see http://www.enthought.com/products/epd.php and http://sagemath.org/. We will not discuss here how to install these distributions. Obviously, we need a C compiler to compile the generated C code. On some operating systems, such as Linux, the compiler will already be present. In this recipe, we will assume that you already have the compiler installed.
How to do it...
Cython can be installed using any of the following methods:
Installing from tarball (
.tar
archive): Cython can be installed from tarball by performing the following steps:Download a tarball from http://cython.org/#download.
Unpack it.
Browse to the directory using the
cd
command.Run the following command:
python setup.py install
Installing with setup tools or pip
We can install Cython from the PyPI repository with
easy_install cython
orsudo pip install cython
.Installing with Windows installers
We...