美文网首页我爱编程
阿里云ECS pip 安装mysqldb-mysql_confi

阿里云ECS pip 安装mysqldb-mysql_confi

作者: vale_nbg | 来源:发表于2018-04-10 10:38 被阅读0次
    1. pip 安装报错
    #pip install MySQL-python
    Collecting MySQL-python
      Downloading http://mirrors.aliyun.com/pypi/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
        100% |████████████████████████████████| 112kB 24.1MB/s
        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-z0025N/MySQL-python/setup.py", line 17, in <module>
            metadata, options = get_config()
          File "/tmp/pip-build-z0025N/MySQL-python/setup_posix.py", line 43, in get_config
            libs = mysql_config("libs_r")
          File "/tmp/pip-build-z0025N/MySQL-python/setup_posix.py", line 25, in mysql_config
            raise EnvironmentError("%s not found" % (mysql_config.path,))
        EnvironmentError: mysql_config not found
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z0025N/MySQL-python/
    You are using pip version 9.0.1, however version 9.0.3 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
    1. 失败原因,确实libmysqlclient-dev
    #apt-get install libmysqlclient-dev
    
    1. 重新安装,ok
    #pip install MySQL-python
    

    相关文章

      网友评论

        本文标题:阿里云ECS pip 安装mysqldb-mysql_confi

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