Need Proxy?

BotProxy: Rotating Proxies Made for professionals. Really fast connection. Built-in IP rotation. Fresh IPs every day.

Find out more


How to use conda/pip install to install packages behind a corporate proxy?

Question

In R I can use

install.packages("pkgName")

to install a new package no problems. But when I tried python and do pip install package it fails with error

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pyarrow/

I think it's because pip doesn't know how to automatically detect the proxy (that's gets set in Internet Explorer) like R can.

Most of the info I find online either don't work or is just too complicated for someone without specialist knowledge to follow.

conda install fails as well.

Is there an easy fix to this?

Answer

Try using the below command on windows command prompt or PowerShell:

pip install --proxy DOMAIN\username:@proxyserver:port

Replace the DOMAIN, username, password, proxy server and port with values specific to your system. This works for a windows 10 installation authenticated by Active Directory that is behind a corporate proxy server.

cc by-sa 3.0