"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Here are some question-style titles that fit the content of your article: * MySQLdb on Mac OS X: Why am I getting \"Library not loaded: libmysqlclient.16.dylib\"? * How to Fix \"Library not loaded: l

Here are some question-style titles that fit the content of your article: * MySQLdb on Mac OS X: Why am I getting \"Library not loaded: libmysqlclient.16.dylib\"? * How to Fix \"Library not loaded: l

Published on 2024-11-17
Browse:281

Here are some question-style titles that fit the content of your article:

* MySQLdb on Mac OS X: Why am I getting \

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.

Latest tutorial More>

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