Python: MySQLdb and "Library not loaded: libmysqlclient.16.dylib"
In an attempt to develop Python/Django applications, you've encountered an issue while installing MySQL-python on Mac OS X 10.6. Despite successfully installing MySQL, importing MySQLdb fails with the error message "Library not loaded: libmysqlclient.16.dylib."
To resolve this issue, you can set the DYLD_LIBRARY_PATH environment variable after running pip install or easy_install:
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
Assuming MySQL is installed in the default location (/usr/local/mysql), this should resolve the issue. The DYLD_LIBRARY_PATH variable tells the system where to look for shared libraries, including the missing libmysqlclient.16.dylib.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3