EnvironmentError: mysql_config not found

Collecting MySQL-python==1.2.5 (from -r requirementsNoGit.txt (line 9))
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
ERROR: Complete output from command python setup.py egg_info:
ERROR: sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-EUGhzs/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-EUGhzs/MySQL-python/

Python 2.7.5 (default, Oct 30 2018, 23:45:53)

install libmysqlclient-dev



sudo yum saerch mysql
sudo yum install -y mysql.x86_64
sudo yum install -y mysql-devel.x86_64

原文地址:https://www.cnblogs.com/rsapaper/p/10823956.html