zoukankan      html  css  js  c++  java
  • ubuntu 14.04安装mysql-python

    网上看到的是想安装mysql-python都得安装mysql本身,可是我就不想安装这个数据库,而是用于连接到别的服务器上的mysql,所以下面就是安装过程:

    1. 直接运行: pip install mysql-python,然后报错如下:

    Traceback (most recent call last):
      File "setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found

    如果是centos,直接运行 这个就可以了: yum install mysql-devel

    2. apt-get install python-dev

    3. apt-get install libmysqlclient-dev 

    4.  pip install mysql-python 就能成功安装了

    本文转自:http://blog.csdn.net/wang1144/article/details/50965941

  • 相关阅读:
    hashlib模块
    logging模块
    Python的富比较方法
    格式化符号说明
    __str__与__repr__区别
    2014-07-18&nbsp;10:25

    2014-07-17&nbsp;17:04
    2014-07-17&nbsp;16:44
    2014-07-16&nbsp;15:54
  • 原文地址:https://www.cnblogs.com/iamjqy/p/7517438.html
Copyright © 2011-2022 走看看