Oursql insallation failing wtih "cython not found"

mysql, oursql, python, sqlalchemy

Solution

Had the same error when running pip-3.2.

This is how I made it work:

Created my env using python-3.2:

virtualenv -p /usr/bin/python3.2

Installed the required packages:

sudo apt-get install python-dev

sudo apt-get install libmysqlclient-dev

Then installed:

sudo pip install cython

sudo pip install oursql

Edit1:

I was able to get pass you error with my above recomendations, but i was wrong (python3.2 was unable to read oursql). I tried the following and was able to make a connection:

First:

sudo apt-get install python3.2-dev

Then installed oursql for Python 3 from source (as suggested by it's maintainer here):

Get the Python 3 version of oursql from here and compile it from source (Don't have enough reputation to post the link, just go to oursql official site for installation instructions).

Problem

Trying to install oursql driver for python3x and sqlalchemy0.8 on ubuntu 12.10. It fails with the following error. ``` sudo pip-3.2 install oursql Downloading/unpacking oursql Running setup.py egg_info for package oursql Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build/oursql/setup.py", line 53 print "cython not found, using previously-cython'd .c file." ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build/oursql/setup.py", line 53 print "cython not found, using previously-cython'd .c file." ^ SyntaxError: invalid syntax ``` When I try to install cython I seem to already have it: ``` sudo pip-3.2 install cython Requirement already satisfied (use --upgrade to upgrade): cython in /usr/local/lib/python3.2/dist-packages Cleaning up. ``` What can I do to make it run?

Original source