Troubleshooting MySQL Python Installation on Mac OS X
Despite using sudo easy_install to install MySQL-python on Mac OS X, you're encountering an EnvironmentError due to a missing mysql_config file. Subsequent attempts to resolve this by adding the path to /usr/local/mysql/bin resulted in a Setup script error involving llvm-gcc-4.2.
Potential Fixes
To resolve these issues, consider the following:
Utilize Homebrew: Homebrew is a package manager that simplifies software installation on macOS. Install Homebrew and use the following commands:
Ensure Path Configuration: After installing mysql-connector-c, verify that the path /usr/local/mysql/bin is added to your PATH environment variable. Run the following command in the terminal:
If you receive an output indicating the presence of /usr/local/mysql/bin in your PATH, the configuration is correct. Otherwise, edit your ~/.bash_profile file and add the path.
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 Why is MySQL-python Installation Failing on My Mac OS X, and How Can I Fix the `mysql_config` and `llvm-gcc` Errors?. For more information, please follow other related articles on the PHP Chinese website!