10

今天早上,我在 Mac OS X 10.6.8 上使用 EPD 7.3 时遇到了与 SSL 相关的问题。当我运行 pip(版本 1.3.1)时,我得到:

pip install requests
Downloading/unpacking requests
  Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/requests/ when looking for download links for requests
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for requests
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/requests/ when looking for download links for requests
  Could not find any downloads that satisfy the requirement requests
No distributions at all found for requests

我想我遇到了https://github.com/pypa/pip/issues/829https://groups.google.com/d/msg/python-virtualenv/C_a_IX_8Ejc/83l8XfpUarQJ中详述的问题——即python链接的openssl版本太旧:

python -c "导入 ssl;打印 ssl.OPENSSL_VERSION"

返回

OpenSSL 0.9.7l 2006 年 9 月 28 日

我的问题是我是否有可能让 EPD Mac 版本的 Python 链接到更新版本的 openssl —— 或者这种改变是 Enthought 需要做的吗?

(我刚想在我的 Mac 上编译 openssl(使用http://techscienceinterest.blogspot.com/2010/12/compiling-openssl-on-mac-os-x-snow.html上的说明)并使用自制软件构建我自己的 Python 可执行文件使用更新版本的 openssl ( http://hackercodex.com/guide/python-virtualenv-on-mac-osx-mountain-lion-10.8/ )。

4

2 回答 2

6

雷蒙德,谢谢你的报告。EPD 的继任者,现在处于后期测试阶段,包含OpenSSL 0.9.8r 8 Feb 2011,并且没有这个问题。(FWIW,它还包含最新版本的requests,您在遇到 SSL 问题时尝试安装该版本。)

它很快就会退出测试版,但与此同时,如果您想在那里试用,我看到您已经收到了测试版邀请。

我们还将调查 EPD 7.3 的可能修复或解决方法。

于 2013-03-17T14:32:50.967 回答
3

I'm finding that with the new SSL-conscious pypi I have to allow-unverified and allow-external for a lot of packages. So for requests, this would be:

pip install --upgrade --force-reinstall --allow-all-external --allow-unverified requests requests
于 2014-09-19T18:24:46.857 回答