简体   繁体   中英

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

In RI 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?

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM