Python import MySQLdb Error on Mac 10.6
Problem:
Attempts to import the MySQLdb python plugin into a python terminal result in the following error:
ImportError: dlopen(/Users/yanigisawa/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.16.dylib
Previously Attempted Solutions:
Workaround for Python on Mac 10.6:
To resolve the issue, add the following symbolic links:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
The above is the detailed content of How to Fix "ImportError: dlopen(...: Library not loaded: libmysqlclient.16.dylib)" in Python on Mac 10.6?. For more information, please follow other related articles on the PHP Chinese website!