Ubuntu18.10中pip install mysqlclient 出现EnvironmentError: mysql_config not found错误

时间:2023-03-08 20:03:18
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-0AcgPD/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "setup_posix.py", line 51, in get_config
libs = mysql_config("libs")
File "setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
EnvironmentError: mysql_config not found ----------------------------------------

Ubuntu18.10中pip install mysqlclient 出现EnvironmentError: mysql_config not found错误

解决办法

sudo apt-get install libmysqlclient-dev

Ubuntu18.10中pip install mysqlclient 出现EnvironmentError: mysql_config not found错误