Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kmlkbfns/mysqlclient/
centos8使用pip3 install mysqlclient 报错如下:
Collecting mysqlclient
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a5/e1/e5f2b231c05dc51d9d87fa5066f90d1405345c54b14b0b11a1c859020f21/mysqlclient-2.0.1.tar.gz (87kB)
100% |████████████████████████████████| 92kB 71.8MB/s
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kmlkbfns/mysqlclient/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-build-kmlkbfns/mysqlclient/setup_posix.py", line 65, in get_config
libs = mysql_config("libs")
File "/tmp/pip-build-kmlkbfns/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kmlkbfns/mysqlclient/
解决方法
yum install mysql-devel