When setting up the Django environment under Mac, I found an error when installing Mysql-python with PIP:
Environmenterror:mysql_config not Foun
Read the information on the Internet, the solution is as follows:
1, download Mysql-python (on-line Baidu download, I use the 1.2.4)
2, decompression, setup_posix.py in Mysql_config.path changes as follows:
Mysql_config.path = "/usr/local/mysql-5.7.18-macos10.12-x86_64/bin/mysql_config"
3, the site.cfg in the Mysql_config.path before the # removed, and change the content as follows:
Mysql_config =/usr/local/mysql-5.7.18-macos10.12-x86_64/bin/mysql_config
4. Use Python setup.py install in terminal
Note: Mysql-5.7.18-macos10.12-x86_64/bin/mysql_config is the path to install MySQL, please change it as appropriate.
This article is from the "AICCDD" blog, make sure to keep this source http://520ccdd.blog.51cto.com/3926314/1918411
Mysql-python issues with Mac OS 10.12 installation