通过pip install mysqlclient时报出了OSError: mysql_config not found错误,如下

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-o4j1ozxx/mysqlclient/
You are using pip version 9.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

  解决办法

yum install mysql-devel gcc gcc-devel python-devel

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-11-18
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案