easy_install-2.7问题

时间:2013-11-12 10:29:45

标签: python python-2.7 pip easy-install

安装easy_install并尝试使用它然后安装python包后,它就失败了。

[root@server]# easy_install-2.7 pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Download error on http://pypi.python.org/simple/pip/: unknown url type: https -- Some packages may not be found!

我似乎得到了重定向

curl -IL http://pypi.python.org/simple/pip/
HTTP/1.1 301 Moved Permanently
Retry-After: 0
Location: https://pypi.python.org/simple/pip/
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 12 Nov 2013 10:28:40 GMT
Age: 0
Connection: close

HTTP/1.1 200 OK
Date: Tue, 12 Nov 2013 10:28:40 GMT
Content-Type: text/html; charset=utf-8
X-PYPI-LAST-SERIAL: 835141
Cache-Control: max-age=86400, public
Strict-Transport-Security: max-age=31536000
Content-Length: 3933
Accept-Ranges: bytes
Age: 78434
Vary: Accept-Encoding

有什么想法吗?

2 个答案:

答案 0 :(得分:17)

安装OpenSSL开发包,然后重新安装Python 2.7,以启用SSL(以及HTTPS)支持。

答案 1 :(得分:0)

在OpenSUSE中(使用42.2测试),安装python-pyOpenSSL就足够了 - 不需要openssl-devel或重新安装。