For the first time under Mac OS, the following error often occurs when you install Mysql-python with PIP:
Sh:mysql_config:command not found
Traceback (most recent):
File "setup.py", line <module>
metadata, Options = Get_config ()
File "/users/***/downloads/mysql-python-1.2.3/setup_posix.py", line +, in Get_config
Libs = Mysql_config ("Libs_r")
File "/users/***/downloads/mysql-python-1.2.3/setup_posix.py", line, in Mysql_config
Raise EnvironmentError ("%s not found"% (Mysql_config.path,))
Environmenterror:mysql_config not found
After a search Baidu, Baidu said it knows the solution is not feasible, after a try, the real solution should be:
Go to MySQL website, download
http://dev.mysql.com/downloads/mysql/
MySQL and install
After the installation is complete, open the terminal and enter the following statement to modify the environment variables:
Path= "$PATH":/usr/local/mysql/bin
OK, now restart the terminal and enter
Pip Install Mysql-python
And then the problem is solved smoothly.
Mac pip Install Mysql-python