pip install tensorflow-gpu==2.2.0 -i https://pypi.douban.com/simple/ 报错

本文介绍了如何在遇到SSLError时创建Tensorflow 2.2 GPU环境,包括更新pip以解决连接问题,并提示了删除'ProxyServer'注册表项作为应急措施。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

conda创建Tensorflow2.2环境 pip install tensorflow-gpu==2.2.0 -i https://pypi.douban.com/simple/ 报错

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)': /simple/tensorflow-gpu/ 
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)': /simple/tensorflow-gpu/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)': /simple/tensorflow-gpu/ 
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)': /simple/tensorflow-gpu/ 
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)': /simple/tensorflow-gpu/ 
Could not fetch URL https://pypi.douban.com/simple/tensorflow-gpu/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.douban.com', port=443): Max retries exceeded with url: /simple/tensorflow-gpu/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)) - skipping 
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.2.0
ERROR: No matching distribution found for tensorflow-gpu==2.2.0 Could not fetch URL https://pypi.douban.com/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.douban.com', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)) - skipping

一、解决方案

1、首先更新pip后看是否能够运行。

python -m pip install --upgrade pip

2、如果不能则尝试(谨慎操作'ProxyServer'请先备份):

  1. Press Win+R to open Run, type in “regedit” and click OK.
  2. Move to HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Internet Settings.
  3. Find a file with the name 'ProxyServer' and delete it.
  4. Open cmd
  5. Fire a command 'pip install flask-bcrypt'
### 安装 mmcv 2.2.0 和 mmcv-full 对于安装 `mmcv` 或者 `mmcv-full` 版本 2.2.0 的情况,考虑到不同版本可能存在的兼容性问题以及特定平台的支持状况,建议遵循官方文档或社区推荐的方法来执行。 当遇到类似 `ERROR: mmcv_full-1.7.2-cp38-cp38-manylinux1_x86_64_cu121torch210.whl is not a supported wheel on this platform` 这样的错误时,这通常意味着所尝试下载的预编译包并不适用于当前的操作系统架构或是Python版本[^2]。为了避开此类问题,在安装指定版本之前应当确认目标环境中 Python 及 CUDA/PyTorch 的配置与所需安装的轮子文件相匹配。 针对 PyTorch-GPU 环境下希望安装 `mmcv-full==2.2.0` 的情形: 可以考虑通过 MIM (MMLab Install Manager) 工具来进行安装操作,该工具能够帮助更方便地管理 OpenMMLab 库及其依赖项。如果直接使用 pip 遇到了困难,则可试用如下命令: ```bash mim install mmcv-full==2.2.0 ``` 另外一种方法是从国内镜像源获取资源以加速下载过程并减少因网络原因造成的失败风险。例如采用豆瓣提供的 Pypi 镜像服务进行安装: ```bash pip install mmcv-full==2.2.0 -i https://pypi.douban.com/simple --trusted-host pypi.douban.com ``` 需要注意的是,具体到某个固定版本号如 `2.2.0` ,应先查阅最新可用版本列表,并确保选择适合自己计算设备特性的二进制分发版(比如 CPU-only vs GPU 支持),从而避免不必要的麻烦[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值