4

How do I use pipenv behind a proxy?

An old thread in github says no (https://github.com/pypa/pipenv/issues/987) I don't find something in the documentation (https://pipenv.kennethreitz.org/en/latest/).

1 Answers1

6

In your user folder create a pip folder, if not already present, and create a pip.ini file in it containing

  [global]
  trusted-host = pypi.python.org
                 pypi.org
                 files.pythonhosted.org
  proxy = <proxy:port>

Hope this helps

  • 2
    Seems to help, but it's not enough. pipenv is using urllib directly, for which setting environment variables (`http_proxy` and `https_proxy`) is needed. – TTimo Dec 11 '20 at 18:05
  • 1
    @TTimo Thanks for this. Your comment works for me. In my case, setting both environment variables worked. – Wayne Lambert Jan 13 '21 at 14:30