Python ImportError: Library Not Loaded on Mac 10.6
Issue:
When importing MySQLdb into a Python terminal on Mac OS 10.6, you encounter an error: "Library not loaded: libmysqlclient.16.dylib."
Resolution:
To resolve this issue, you can apply the following workaround specific to Python:
Create Symbolic Links: Create symbolic links as follows:
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
Additional Notes:
The above is the detailed content of Why am I getting 'Library not loaded: libmysqlclient.16.dylib' when importing MySQLdb on Mac OS 10.6?. For more information, please follow other related articles on the PHP Chinese website!