importing MySQLdb
Dilara Ally
dilara.ally at gmail.com
Wed Dec 28 17:51:25 EST 2011
Hi All
I'm trying to import the MySQLdb for python. I downloaded the proper
setuptools egg (ver2.7) for a Mac with OSX10.6
I then downloaded the MySQL-python-1.2.3 and ran the following commands
python setup.py build
sudo python setup.py install
Then to test that the module was properly loaded I used the interactive
python prompt ad ran the following command:
import MySQLdb
The error message read:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
File "build/bdist.macosx-10.6-intel/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.6-intel/egg/_mysql.py", line 6, in
__bootstrap__
ImportError:
dlopen(/Users/dally/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so,
2): Library not loaded: libmysqlclient.18.dylib
Referenced from:
/Users/dally/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so
Reason: image not found
Does anyone have any ideas on how to fix this problem? Any help will be
greatly appreciated!
Dilara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111228/777c41a2/attachment-0001.html>
More information about the Python-list
mailing list