Home >Database >Mysql Tutorial >How to Successfully Install MySQL Python on macOS and Troubleshoot Common Errors?
Installing MySQL Python on Mac OS X: Tackling Persistent Errors
While attempting to install MySQL Python using easy_install, you may encounter an error indicating that mysql_config is missing. Addressing this issue by modifying your PATH environment variable may lead to a subsequent error involving llvm-gcc-4.2. Instead, consider taking the following steps:
Install Prerequisites:
Install MySQL Connector and MySQL Python:
Additional Considerations:
MAMP Installed:
Installing MAMP (a web development environment) should not interfere with MySQL Python installation.
Reinstalled MySQL:
If you have reinstalled MySQL, it's possible that the mysql_config file was not reconfigured. To address this, link the file to its proper location using the following command:
ln -s /usr/local/mysql/bin/mysql_config /usr/bin
llvm-gcc-4.2 Error:
If you're still encountering the llvm-gcc-4.2 error after installing the prerequisites and mysql-python, try unlinking the Xcode-provided llvm-gcc link:
sudo rm /usr/bin/llvm-g -4.2
Follow these steps to resolve the most common errors encountered during MySQL Python installation on Mac OS X.
The above is the detailed content of How to Successfully Install MySQL Python on macOS and Troubleshoot Common Errors?. For more information, please follow other related articles on the PHP Chinese website!