记录踩过的坑-PyTorch

安装报错

按PyTorch官网给出的命令

复制代码
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

报错

复制代码
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

原因:当前python版本过低(我是3.6)

解决方法:用Anaconda重新建一个Python高版本环境(比如3.10)

RuntimeError: Distributed package doesn't have NCCL built in

我的是Windows系统,不支持nccl

在运行的py文件最开始加代码

复制代码
import os
os.environ["PL_TORCH_DISTRIBUTED_BACKEND"] = "gloo"

修改类似地方,把nccl改成gloo

复制代码
torch.distributed.init_process_group("nccl")
相关推荐
周末程序猿1 分钟前
图解 120 个大语言模型(LLM)核心概念(61-90)
人工智能
科技圈快迅7 分钟前
游戏投影仪和普通投影仪区别是什么?2026游戏投影仪测评
人工智能
陆枫Larry37 分钟前
CPU 和 GPU 的核心区别与适用场景
人工智能
用户8356290780511 小时前
Python 实现 Excel 页面布局与打印设置自动化
后端·python
Aa99883341 小时前
AI视觉检测设备厂家的技术选型框架——密封件和磁材的缺陷分类与光学成像原理
人工智能
吴佳浩1 小时前
今天我们讲讲大模型的“核心”技术:蒸馏(Model Distillation)
人工智能·llm·agent
阿里云大数据AI技术1 小时前
阿里云 ES AI 引擎版:面向 Agent 场景,为亿级租户、千亿规模向量设计的搜索引擎
人工智能·elasticsearch·agent
郭小铭1 小时前
[开源] 做了一个本地优先的多 Agent 市场研究桌面:Evidence Loom
人工智能
星栈1 小时前
翻完 Pi 源码:它和 Codex、Claude Code 有何不同
人工智能·agent