我能在Mac OS X上重新链接python到openssl的新版本吗?

时间:2022-03-25 02:45:09

This morning, I'm running into SSL related problems using EPD 7.3 on Mac OS X 10.6.8. When I run pip (version 1.3.1), I get:

今天早上,我在Mac OS X 10.6.8上使用epd7.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

I think I'm running into the problem detailed in https://github.com/pypa/pip/issues/829 and https://groups.google.com/d/msg/python-virtualenv/C_a_IX_8Ejc/83l8XfpUarQJ -- that is, the version of openssl linked to python is too old:

我认为我遇到了https://github.com/pypa/pip/issues/829和https://groups.google.com/d/msg/python-virtualenv/C_a_IX_8Ejc/83l8XfpUarQJ中详细的问题——也就是说,链接到python的openssl版本太老了:

python -c "import ssl; print ssl.OPENSSL_VERSION"

python - c”进口ssl;打印ssl.OPENSSL_VERSION”

returns

返回

OpenSSL 0.9.7l 28 Sep 2006

OpenSSL 0.9.7l28 2006年9月28日

My question is whether it's possible for me to get the EPD Mac version of Python to link to a newer version of openssl -- or is this change something Enthought needs to do?

我的问题是,我是否有可能让EPD Mac版本的Python链接到一个新版本的openssl——或者,这是不是一个需要做的改变?

(I just figured out to compile openssl on my Mac (using instructions at http://techscienceinterest.blogspot.com/2010/12/compiling-openssl-on-mac-os-x-snow.html) and use homebrew to build my own Python executable to use a newer version of openssl (http://hackercodex.com/guide/python-virtualenv-on-mac-osx-mountain-lion-10.8/).

(我刚想到在我的Mac上编译openssl(使用http://techscienceinterest.blogspot.com/2010/12/compile -openssl-on- Mac -os-x-snow.html的说明),然后使用homebrew构建我自己的Python可执行文件,使用更新版本的openssl

2 个解决方案

#1


6  

Raymond, thanks for the report. EPD's successor, now in late beta, contains OpenSSL 0.9.8r 8 Feb 2011, and does not have this problem. (FWIW, it also contains a recent version of requests, which you were attempting to install when you hit the SSL issue.)

雷蒙德,谢谢你的报告。EPD的后续版本,目前正在测试后期,包含OpenSSL 0.9.8 r8, 2011年2月8日,没有这个问题。(FWIW,它还包含最近版本的请求,当您遇到SSL问题时,您正在尝试安装该请求。)

It will be out of beta very soon, but in the meantime I see that you already have a beta invitation if you would like to try it there.

它很快就会出来测试,但同时我看到你已经有了一个测试邀请,如果你想在那里试试的话。

We will also investigate possible fixes or workarounds for EPD 7.3.

我们亦会调查环保署7.3的可能修订或解决办法。

#2


2  

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:

我发现,在新的sslp意识的pypi中,我必须允许-未经验证的和允许外部的许多包。因此,对于请求,这将是:

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

#1


6  

Raymond, thanks for the report. EPD's successor, now in late beta, contains OpenSSL 0.9.8r 8 Feb 2011, and does not have this problem. (FWIW, it also contains a recent version of requests, which you were attempting to install when you hit the SSL issue.)

雷蒙德,谢谢你的报告。EPD的后续版本,目前正在测试后期,包含OpenSSL 0.9.8 r8, 2011年2月8日,没有这个问题。(FWIW,它还包含最近版本的请求,当您遇到SSL问题时,您正在尝试安装该请求。)

It will be out of beta very soon, but in the meantime I see that you already have a beta invitation if you would like to try it there.

它很快就会出来测试,但同时我看到你已经有了一个测试邀请,如果你想在那里试试的话。

We will also investigate possible fixes or workarounds for EPD 7.3.

我们亦会调查环保署7.3的可能修订或解决办法。

#2


2  

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:

我发现,在新的sslp意识的pypi中,我必须允许-未经验证的和允许外部的许多包。因此,对于请求,这将是:

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