固定到特定版本时 pip 安装失败 (django-reversetag)

pip install fails when pinned to a specific version (django-reversetag)

我的 req.txt 中有一堆软件包,我通常只需使用以下命令即可将其安装在我的所有环境中:

pip install -r req.txt

现在,这个 req 文件的一行有:

django-reversetag==0.3.2

今天,当我进行常规安装时,我意外地收到了这条消息:

Exception:
Traceback (most recent call last):
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/req.py", line 1197, in prepare_files
    do_download,
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/req.py", line 1375, in unpack_url
    self.session,
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/download.py", line 546, in unpack_http_url
    resp = session.get(target_url, stream=True)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 468, in get
    return self.request('GET', url, **kwargs)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/download.py", line 237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/home/foo/ve/sport/local/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 375, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /packages/source/d/django-reversetag/django-reversetag-0.3.2.tar.gz (Caused by <class 'httplib.BadStatusLine'>: '')

然而,当我简单地改变时:

django-reversetag==0.3.2

到,

django-reversetag

..一切似乎都很好......我认为这很奇怪。我总是被告知将包固定到特定版本。

我不知道为什么会失败..我有大约 15 个项目使用相同的请求文件..

知道为什么会这样。

提前致谢。

pip 出现了一些奇怪的错误,解决方案是升级到最新版本 6.0.6