(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


任何想法如何解决此问题?

最佳答案

确保系统中已安装mysql_config(例如,运行locate mysql_config)。通常由libmysqlclient软件包或类似的软件包提供,具体取决于您的分发。

如果存在,请尝试提供到pip的路径,例如:

PATH=/usr/local/mysql/bin:$PATH pip install mysqlclient

关于python - 在virtualenv内安装mysqlclient时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47855792/

10-13 02:08