美文网首页
centos 7 安装mysqlclient报错mysql_co

centos 7 安装mysqlclient报错mysql_co

作者: wsf535 | 来源:发表于2018-02-24 13:31 被阅读537次

    具体报错如下:

    [root@10-57-22-228 ~]#  pip install mysqlclient
    Collecting mysqlclient
      Downloading http://pypi.doubanio.com/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz (89kB)
        100% |████████████████████████████████| 92kB 3.8MB/s 
        Complete output from command python setup.py egg_info:
        sh: mysql_config: command not found
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-mPr2_0/mysqlclient/setup.py", line 17, in <module>
            metadata, options = get_config()
          File "setup_posix.py", line 44, in get_config
            libs = mysql_config("libs_r")
          File "setup_posix.py", line 26, in mysql_config
            raise EnvironmentError("%s not found" % (mysql_config.path,))
        EnvironmentError: mysql_config not found
        
    
    

    解决方法,先安装mysql-devel,再安装mysqlclient

    yum install mysql-devel
    
    pip install mysqlclient
    

    相关文章

      网友评论

          本文标题:centos 7 安装mysqlclient报错mysql_co

          本文链接:https://www.haomeiwen.com/subject/ztdqxftx.html