terça-feira, 26 de março de 2019

How to set pip install behind proxy

Under windows:

Set environment variables:

http_proxy=http://DOMAIN\user:pass@proxy:port
https_proxy=https://DOMAIN\user:pass@proxy:port

Then:

 pip --trusted-host pypi.org install package

or

pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install packagename

or

Create a file named pip.ini in: c:\programdata\pip. Its necessary create the folder.

Put inside:
[global]
trusted-host = pypi.python.org
   pypi.org
   files.pythonhosted.org

Set only this:
https_proxy=https://DOMAIN\user:pass@proxy:port

Now you can pip install.

Nenhum comentário:

Postar um comentário

Decorator Powershell Design Patterns

 Powershell Design Patterns Decorator ```powershell # Classe base 'Beverage' class Beverage {     [string]$description = "Unkno...