Install cython on python 3.x

I need to install cython for python3.x .I have an ubuntu installation with python 2.6, 2.7 and 3.2 on it. Trying to apt-get the cython package installs pymodules only in 2.x versions. Is there a way to target a specific version?


Solution 1:

According to the Cython Wiki, you have a few choices for installing. One of them is:

sudo apt-get install python-dev build-essential

You can also download the latest version from Cython. Just untar/unzip the package, and then run (as superuser/sudo/root):

python setup.py install

Solution 2:

python 2 and 3 are in separate packages so for python 2

sudo apt-get install  cython

and for python3

sudo apt-get install  cython3