【问题标题】:Can I relink enthought python to new version of openssl on Mac OS X?我可以在 Mac OS X 上将 enthought python 重新链接到新版本的 openssl 吗?
【发布时间】:2013-03-04 16:30:50
【问题描述】:

今天早上,我在 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/)。

【问题讨论】:

    标签: python macos openssl pip enthought


    【解决方案1】:

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

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

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

    【讨论】:

    • 乔纳森:谢谢。实际上,我在使用 pip 1.3.1 时遇到了这个问题。我的解决方法:暂时使用easy_install降级到pip 1.2.1。
    • 小心,因为在 pip 1.3 之前它非常不安全,并且 pip 1.3 为 PyPI 安装添加了 SSL 支持。
    • 我知道带有 SSL 的 pip 1.3 是一件好事,但是当 pip 1.3 在我的上下文中根本不起作用时,我愿意生活得有点危险并使用 pip 1.2.1暂时。
    【解决方案2】:

    我发现使用新的具有 SSL 意识的 pypi 时,我必须为很多软件包允许未验证和允许外部。所以对于requests,这将是:

    pip install --upgrade --force-reinstall --allow-all-external --allow-unverified requests requests
    

    【讨论】:

      猜你喜欢
      • 2018-10-30
      • 1970-01-01
      • 2017-12-14
      • 2016-05-09
      • 1970-01-01
      • 2016-11-23
      • 2012-06-01
      • 1970-01-01
      • 2016-05-22
      相关资源
      最近更新 更多