I'm trying to use pip inside python script. I encountered a problem with proxy.
When I'm installing module from cmd I'm using this command:
python -m pip install [module] --proxy=[proxy]
Inside python script I'm using the following code:
def install(package):
pip.main(['install', '--proxy==[proxy]', package])
but it ends with error:
[33m Retrying (Retry(total=4, connect=None, read=None, redirect=None))
after connection broken by 'ProxyError('Cannot connect to proxy.',
NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection
object at 0x043717F0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))':
/simple/pandas/[0m
What I'm doing wrong?