Home > Database > Mysql Tutorial > body text

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
Release: 2024-10-26 20:35:02
Original
883 people have browsed it

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/
Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!