问题
Collecting MySQL-python==1.2.5 (from -r requirements.txt (line 3)) Downloading https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
|████████████████████████████████| 112kB 462kB/sERROR: 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-pKINs7/MySQL-python/setup.py", line 17, in <module>metadata, options = get_config()File "setup_posix.py", line 43, in get_configlibs = mysql_config("libs_r")File "setup_posix.py", line 25, in mysql_configraise 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-pKINs7/MySQL-python/
对于Ubuntu:
$ sudo apt update$ sudo apt install python-dev$ sudo apt install python-MySQLdb
对于CentOS:
$ yum install python-devel mysql-devel
