这是博客文章的全文链接如下:
如果您最近尝试使用pip安装软件包,可能会遇到此错误:
Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate:
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:
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:
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:
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没有shitload的工作。
现在的简单解决方法是安装pip 1.2.1,它不需要SSL:
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install
如果你正在使用EPD,并且你不使用它的类可能会破坏,你可能需要考虑安装新的化身:Enthought Canopy。我知道他们知道由于以前版本的OpenSSL造成的问题,并会想象他们正在使用一个新的版本,现在应该使用pip 1.3.1。