I am running Enthought Canopy, python version 2.7.3, and am having difficulties using the module MySQLdb. I installed MySQL_Python 1.2.3 from the Canopy Package Manager, but when I run my code I get
File "pyfits_test.py", line 2, in <module>
import MySQLdb as mdb
File "/home/cmessick/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: libssl.so.6: cannot open shared object file: No such file or directory
Line 2 of my code simply says
import MySQLdb as mdb
I also tried
from MySQL_python import MySQLdb as mdb
and got
Traceback (most recent call last):
File "pyfits_test.py", line 2, in <module>
from MySQL_python import MySQLdb as mdb
ImportError: No module named MySQL_python
Does anybody have any suggestions to make Enthought Canopy work with MySQLdb?
Edit: Not sure it matters, but I'm running Ubuntu 12.04.
Second Edit: I figured out how to add to the module search path, so at the beginning of my code before anything else I now have:
import sys
sys.path.append('/usr/lib/python2.7/dist-packages/')
Once I do this, it works. Does anybody have a more permanent solution that I won't have to implement every time?