这是下面链接的博客文章的全文:
如果您最近尝试使用pip安装软件包,则可能遇到此错误:
Could not fetch URL https://pypi.python.org/simple/Django/: 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/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1)) 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 Django==1.5.1 (from -r requirements.txt (line 1)) Cannot fetch index base URL https://pypi.python.org/simple/ Could not fetch URL https://pypi.python.org/simple/Django/1.5.1: 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/Django/1.5.1 when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1)) Could not fetch URL https://pypi.python.org/simple/Django/: 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/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1)) Could not find any downloads that satisfy the requirement Django==1.5.1 (from -r requirements.txt (line 1))No distributions at all found for Django==1.5.1 (from -r requirements.txt (line 1))Storing complete log in /Users/paul/.pip/pip.log
这似乎是旧版本的OpenSSL与pip 1.3.1不兼容的问题。如果您使用的是非库存的Python发行版(特别是EPD 7.3),则很可能会设置不配合pip
1.3.1进行工作,而不会花费很多精力。
目前,最简单的解决方法是安装不需要SSL的pip 1.2.1:
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gztar xvfz pip-1.2.1.tar.gzcd pip-1.2.1python setup.py install
如果您使用的是EPD,而不是在可能会发生问题的课堂上使用它,则可能需要考虑安装新的化身:有思想的树冠。我知道他们知道由先前版本的OpenSSL引起的问题,并且可以想象他们现在正在使用一个新版本,该版本应与pip
1.3.1配合使用。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)