zoukankan      html  css  js  c++  java
  • centos下pip安装mysql_python

    今天在使用pip安装mysql_python时,遇到一些问题,现记录下来。

    1.执行pip install mysql-python时,报错
    Running setup.py egg_info for package mysql-python  
        sh: mysql_config: command not found  
        Traceback (most recent call last):  
          File "<string>", line 16, in <module>  
          File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>  
            metadata, options = get_config()  
          File "setup_posix.py", line 43, in get_config  
            libs = mysql_config("libs_r")  
          File "setup_posix.py", line 25, in mysql_config  
            raise EnvironmentError("%s not found" % (mysql_config.path,))  
        EnvironmentError: mysql_config not found  
        Complete output from command python setup.py egg_info:  
        sh: mysql_config: command not found  
      
    Traceback (most recent call last):  
      
      File "<string>", line 16, in <module>  
      
      File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>  
      
        metadata, options = get_config()  
      
      File "setup_posix.py", line 43, in get_config  
      
        libs = mysql_config("libs_r")  
      
      File "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/mysql-python  
    Storing complete log in /root/.pip/pip.log  
    

     解决方法:yum install mysql-devel

    2.再次执行pip install mysql-python安装时,仍然报错

    error: command 'gcc' failed with exit status 1

     解决方法:yum install gcc python-devel

  • 相关阅读:
    Pyinstaller(python打包为exe文件)
    matplotlib 填充颜色
    Visual Studio 2015 Enterprise
    latex中pdflatex与xelatex的区别
    latex插图续
    dva+umi+antd项目从搭建到使用(没有剖验证,不知道在说i什么)
    umi+dva+antd新建项目(亲测可用)
    HTTP缓存机制
    企业网站常见需求整理
    立足于运维与监控的前端框架 NoahV
  • 原文地址:https://www.cnblogs.com/yangxia-test/p/4691947.html
Copyright © 2011-2022 走看看