Installing MySQL Connector for Python on Mac OS X
You have encountered an issue while attempting to install MySQL Python on Mac OS X. Specifically, you received the error "EnvironmentError: mysql_config not found" when trying to run "sudo easy_install MySQL-python".
Addressing the "EnvironmentError"
To resolve the "EnvironmentError", you should export the path to the MySQL binary directory. However, it appears that you have already done this using the command "export PATH=$PATH:/usr/local/mysql/bin".
Addressing the "Setup script exited with error"
You then encountered a "Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1" error. To address this issue, you should install the LLVM-GCC package.
However, it seems that you have already attempted to install this package without success. Instead, we recommend following the alternative steps outlined below:
By following these steps, you should be able to successfully install MySQL Python on your Mac OS X system.
The above is the detailed content of How to Fix 'mysql_config not found' and 'Setup script exited with error' When Installing MySQL-python on macOS?. For more information, please follow other related articles on the PHP Chinese website!