下载带有代理设置的Python包

问题描述 投票:0回答:1

我在公司办公室,在进入他们的网络之前我无法下载任何 python 包。我正在使用 python 3.6 和 windows 8 (64 位)。 有没有办法通过设置或应用一些代理设置来下载软件包。.如何通过 Internet Explorer 查看我的网络互联网代理设置?

我已检查该设置并在“自动检测设置”中打勾

我收到此错误:

pip install package_name

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) 
after connection broken by 
'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x0000008C004E0EB8>: Failed to 
establish a new connection: [Errno 11002] getaddrinfo failed',)
': /simple/gensim/
python-3.x
1个回答
0
投票

您应该尝试一下,它适用于大多数代理,但不是全部

pip install --proxy http://PROXY-ADRESS:PROXY-PORT <PACKAGE>

例如,如果 proxy = 10.10.10.10:80 并且您想下载 flask 包,您应该写:

pip install --proxy http://10.10.10.10:8080 flask
© www.soinside.com 2019 - 2024. All rights reserved.