Skip to content

Instantly share code, notes, and snippets.

@tinnguyenz
Created January 5, 2012 17:49
Show Gist options
  • Save tinnguyenz/1566335 to your computer and use it in GitHub Desktop.
Save tinnguyenz/1566335 to your computer and use it in GitHub Desktop.
MySQLdb on Centos (virtualenv)
Solved this issue in the following way
Copy MySQLdb folder from site-packages directory of Python2.7 to Python2.6.
Also copy the following files from site-packages directory of Python2.7 to Python2.6.
_mysql.so
_mysql_exceptions.py
_mysql_exceptions.pyc
_mysql_exceptions.pyo
Now try the following
>>> import MySQLdb
>>> MySQLdb.__version__
'1.2.3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment