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

    entos下用pip安装mysql_python报错

    [plain] view plain copy
     
    1.   Running setup.py egg_info for package mysql-python  
    2.     sh: mysql_config: command not found  
    3.     Traceback (most recent call last):  
    4.       File "<string>", line 16, in <module>  
    5.       File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>  
    6.         metadata, options = get_config()  
    7.       File "setup_posix.py", line 43, in get_config  
    8.         libs = mysql_config("libs_r")  
    9.       File "setup_posix.py", line 25, in mysql_config  
    10.         raise EnvironmentError("%s not found" % (mysql_config.path,))  
    11.     EnvironmentError: mysql_config not found  
    12.     Complete output from command python setup.py egg_info:  
    13.     sh: mysql_config: command not found  
    14.   
    15. Traceback (most recent call last):  
    16.   
    17.   File "<string>", line 16, in <module>  
    18.   
    19.   File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>  
    20.   
    21.     metadata, options = get_config()  
    22.   
    23.   File "setup_posix.py", line 43, in get_config  
    24.   
    25.     libs = mysql_config("libs_r")  
    26.   
    27.   File "setup_posix.py", line 25, in mysql_config  
    28.   
    29.     raise EnvironmentError("%s not found" % (mysql_config.path,))  
    30.   
    31. EnvironmentError: mysql_config not found  
    32.   
    33. ----------------------------------------  
    34. Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/mysql-python  
    35. Storing complete log in /root/.pip/pip.log  

    安装mysql-devel后正常运行

    yum install mysql-devel

    如果手工安装mysql_python

    在setup_posix.py内找到mysql_config.path

    变成mysql_config.path=/xxx/xxx(mysql安装路径/bin/mysql_config)

  • 相关阅读:
    nginx不支持pathinfo模式解决方法
    php只保留两位小数
    分享图文到QQ空间
    android 使用信鸽推送通知栏不显示推送的通知?
    Editetext获取焦点后让输入软键盘中出现搜索按键
    Android EditText的使用过程中遇到的问题
    在线根据现有apk生成指定id的推广apk (已过时)
    @Validated和@Valid区别
    idea快捷键使用总结
    大概
  • 原文地址:https://www.cnblogs.com/ExMan/p/8575904.html
Copyright © 2011-2022 走看看