运行 MySQL-python 1.2.4 setup.py 后,尝试使用时出现以下错误:import MySQLdb:
$ python mysqldb_module.py
Traceback (most recent call last):
File "mysqldb_module.py", line 1, in <module>
import MySQLdb
File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.8-intel.egg/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.8-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.8-intel.egg/_mysql.so
Reason: image not found
有人有什么智慧可以传授吗?