Using pip behind a PAC proxy

0

The proxy at my workplace is specified in a PAC file which is applied to browsers, but not the command prompt/PowerShell. This means I can't use pip, virtualenv or Python libraries that need web access like requests.

I've tried running pip with the pip install package --proxy=username:password@address:port, where username:password are my credentials and where address:port is the last line of the PAC file. However, this still returns ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authorization Required',)

Is there a way to directly use the PAC file as the proxy, or something similar?

James Whitehead

Posted 2018-02-23T15:18:37.677

Reputation: 13

I believe the command should be pip install package --proxy http://username:password@address:port – Mateo – 2018-02-23T21:26:58.123

No answers