ubuntu安装EnvironmentError: mysql_config not found错误

[python] view plain copy

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-4mLxpd/MySQL-python/setup.py", line 17, in <module>  
        metadata, options = get_config()  
      File "/tmp/pip-build-4mLxpd/MySQL-python/setup_posix.py", line 43, in get_config  
        libs = mysql_config("libs_r")  
      File "/tmp/pip-build-4mLxpd/MySQL-python/setup_posix.py", line 25, in mysql_config  
        raise EnvironmentError("%s not found" % (mysql_config.path,))  
    EnvironmentError: mysql_config not found  

解决办法:

[python] view plain copy

sudo apt-get install libmysqlclient-dev  

然后进入mysql_config的路径(/usr/bin/mysql_config)

[python] view plain copy

sudo updatedb  
locate mysql_config  

然后再去安装,ok啦~

©️2020 CSDN 皮肤主题: 大白 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值