You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

需白名单哪些URL以解决严格代理下pip安装openpyxl、PyPDF2的问题

解决pip安装openpyxl与PyPDF2的代理白名单配置问题

要通过pip正常安装openpyxl和PyPDF2,需将以下核心URL加入代理白名单:

  • https://pypi.org/:PyPI官方索引服务器,用于查询包的版本信息与下载路径
  • https://files.pythonhosted.org/:PyPI的包文件存储节点,所有PyPI包的实际下载文件都托管在此

报错原因说明

你的报错是代理禁止了对PyPI索引路径的访问,导致pip无法查询到openpyxl的可用版本:

C:\Windows\system32>pip install openpyxl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))': /simple/openpyxl/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))': /simple/openpyxl/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))': /simple/openpyxl/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))': /simple/openpyxl/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))': /simple/openpyxl/
ERROR: Could not find a version that satisfies the requirement openpyxl (from versions: none)
ERROR: No matching distribution found for openpyxl

将上述两个URL加入白名单后,pip就能正常查询包索引并下载openpyxl、PyPDF2及其依赖包。

内容的提问来源于stack exchange,提问作者Arek

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 19:37:06