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)

  • 相关阅读:
    MySQL—2、B-Tree,B+Tree,聚集索引,非聚集索引
    transient关键字的作用及使用方法
    通过Executors创建线程池和注意小点
    @Validated校验
    Elasticsearch-head插件的安装与配置
    bayaim_java_入门到精通_听课笔记bayaim_20181120
    bayaim_hadoop2_hdfs_20181107
    bayaim_hadoop1_2.2.0伪分布式搭建
    bayaim_hadoop 开篇 0.0
    bayaim_linux_configure_oracle
  • 原文地址:https://www.cnblogs.com/ExMan/p/8575904.html
Copyright © 2011-2022 走看看