【问题标题】:Installing MySQL-python with easy-install failed使用 easy-install 安装 MySQL-python 失败
【发布时间】:2014-11-07 02:52:01
【问题描述】:

我正在努力在我的 Centos VPS 上安装 MySQL-python。我有“主要”Python 2.6(CentOS 自动附带的)和我在(2.7)之后安装的另一个。所以我使用了这个命令:

easy_install-2.7 MySQL-python

但它会重现以下错误:

Searching for MySQL-python
Reading https://pypi.python.org/simple/MySQL-python/
Download error on https://pypi.python.org/simple/MySQL-python/: unknown url type: https -- Some        packages may not be found!
Couldn't find index page for 'MySQL-python' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may     not be found!
No local packages or download links found for MySQL-python
error: Could not find suitable distribution for Requirement.parse('MySQL-python')

感谢您阅读我的问题并可能提供帮助!

【问题讨论】:

  • 为什么不使用pip 而不是easy_install
  • @MauroBaraldi 我试过了,但是 pip 会为我的 2.6 python 下载所有内容,正如我尝试的那样,pip-2.7 不能那样工作。如何使用 pip-2.7?

标签: python linux centos mysql-python centos6.5


【解决方案1】:

也许您使用的是旧版本的easy_install,这可能是问题的根源。您可以按照distributedoc 包中的说明进行操作,然后安装pip。既然你已经安装了pip,你就可以轻松安装MySQL-python了。

【讨论】:

  • 我这样做了,但是当我尝试使用 pip 安装它时,它会为 python 2.6 而不是 2.7 安装它,我想...
【解决方案2】:

也许尝试使用一些句子,包括mysqldb。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-10
    • 1970-01-01
    • 2019-02-11
    相关资源
    最近更新 更多