Home  >  Article  >  Database  >  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 \"Librar

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 \"Librar

Patricia Arquette
Patricia ArquetteOriginal
2024-10-26 20:35:02884browse

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.

The above is the detailed content of 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 \"Librar. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn