【发布时间】:2020-05-07 22:24:11
【问题描述】:
上下文:
我正在使用 pip 从克隆的 repo 安装软件包。
遇到问题时我在做什么:
python3 -m pip install --proxy "http://internal.url:8080" --upgrade pip //更新pip并设置代理服务器
pip install -r requirements.txt // 安装包
结果:
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001F6DF6CB7C0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/azure-mgmt-resource/
ERROR: Could not find a version that satisfies the requirement azure-mgmt-resource (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for azure-mgmt-resource (from -r requirements.txt (line 1))
我的系统: - 视窗 10 - Python 3.8.3rc1 - 点 20.1
我更新了点子:
一些 S.O.答案说问题是需要更新点子。我试过this answer,它要求:
curl https://bootstrap.pypa.io/get-pip.py | python
结果是:
C:\PythonApps\carrieralloc-poc>curl https://bootstrap.pypa.io/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:55 --:--:-- 0curl: (7) Failed to connect to bootstrap.pypa.io port 443: Connection refused
“连接被拒绝”是这里的一个主题。
This blog suggested 我的 ip 地址可能被列入黑名单(怀疑我使用的是公司代理)
但是我尝试了他的建议并运行了curl https://pypi.org
结果:curl: (7) Failed to connect to pypi.org port 443: Connection refused
我想知道我的代理是否设置正确:
我找不到检查代理的命令。
有什么建议吗?谢谢!
【问题讨论】:
标签: python python-3.x azure proxy pip