(my_project) [yw@yanbox my_project]$ pip install mysqlclient
File "/tmp/pip-build-zza957yo/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-zza957yo/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
任何想法如何解决这个问题?
答案 0 :(得分:0)
确保系统中已安装mysql_config
(例如,运行locate mysql_config
)。它通常由libmysqlclient
包或类似提供,具体取决于您的发行版。
如果它存在,请尝试将其路径提供给pip
,例如:
PATH=/usr/local/mysql/bin:$PATH pip install mysqlclient