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

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
   
    ----------------------------------------

解决办法

sudo apt-get install libmysqlclient-dev

posted @ 2019-05-14 11:17  KadyCui  阅读(327)  评论(0编辑  收藏  举报