`TooManyRedirects`与`pipenv lock`和`pipenv install`

时间:2018-05-16 19:41:26

标签: python pipenv

pipenv lockpipenv install命令引发异常,表示正在执行的请求太多。

Locking [dev-packages] dependencies…
", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/requests/sessions.py", line 617, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/requests/sessions.py", line 617, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/requests/sessions.py", line 110, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

相关:

1 个答案:

答案 0 :(得分:0)

如果您指定了[[source]]网址,则需要将其从https://pypi.python.org/simple更改为https://pypi.org/simple

E.g:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"