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

时间:2015-01-18 00:01:26

标签: python python-2.7 pip

我的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个项目使用相同的req文件..

为什么会发生这种情况的任何想法。

提前致谢。

1 个答案:

答案 0 :(得分:1)

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