码迷,mamicode.com
首页 > 数据库 > 详细

pip 安装mysqlclient报错OSError: mysql_config not found

时间:2018-02-03 21:54:36      阅读:1907      评论:0      收藏:0      [点我收藏+]

标签:sql   div   报错信息   info   line   centos   get   command   oserror   

执行 pip install mysqlclient 报错信息如下:

[root@CentOS7-demo bin]# pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-1.3.12.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-ctrzre4u/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "/tmp/pip-build-ctrzre4u/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-build-ctrzre4u/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found

 

解决办法:

yum install mysql-devel

pip install mysqlclient

 

pip 安装mysqlclient报错OSError: mysql_config not found

标签:sql   div   报错信息   info   line   centos   get   command   oserror   

原文地址:https://www.cnblogs.com/zhouxinfei/p/8410757.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!