Today, when using PIP to install Mysql_python, there are some problems that are now recorded.
1.
error when executing pip install Mysql-python
Running setup.py egg_info for package Mysql-python Sh:mysql_config:command not found Traceback (most recent CA ll last): File ' <string> ', line +, in <module> file "/tmp/pip-build/mysql-python/setup.py", Lin E, in <module> metadata, options = Get_config () File ' setup_posix.py ', line +, in Get_config Libs = Mysql_config ("Libs_r") File "setup_posix.py", line, in Mysql_config raise EnvironmentError ("%s not found"% (Mysql_config.path,)) Environmenterror:mysql_config not found complete output from command python setup.py egg_info:sh:mysql_config : Command not found Traceback (most recent): File ' <string> ', line +, in <module> file "/tmp/pip-build/mysql-python/setup.py", line +, in <module> metadata, options = Get_config () File "set up_posix.py ", line +, in Get_config libs = Mysql_config (" Libs_r ") File" setup_posix.py ", Mysql_config raise EnvironmentError ("%s not found"% (Mysql_config.path,)) Environmenterror:mysql_ Config not found----------------------------------------Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/mysql-python Storing complete log in/root/.pip/pip.log
Workaround:yum install Mysql-devel
2. Still error when performing pip install Mysql-python installation
Error:command ' gcc ' failed with exit status 1
Workaround:yum install gcc python-devel
CentOS under PIP installation Mysql_python