记录踩过的坑-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")
相关推荐
MobotStone3 小时前
从“听得懂”到“干得了”:工业大模型落地工厂的三层进化路线
人工智能
wangruofeng4 小时前
GLM-5.3-Flash 发布:追平 Opus 4.8 的智力,1/40 的价格,跑在国产芯片上
人工智能·aigc·chatglm (智谱)
皮皮虾❀6 小时前
钉钉AI服务商×教育行业:AI现代产业学院共建一体化实战——从“高校AI教学缺平台”到“校企共建AI产业学院培养数字化人才
人工智能·钉钉
kobe_OKOK_6 小时前
DRF接口幂等操作
python·django
火山引擎开发者社区6 小时前
【议程来了】火山引擎开发者社区技术日・NVIDIA 独家赞助-成都站
人工智能
三声三视6 小时前
从崩溃日志到 AI 技能:tri-god 蒸馏实战
人工智能·ai·aigc·agent
ZGIAI6 小时前
ZGI Workflow 并发控制:保护下游接口
人工智能·架构
richard_first6 小时前
Transformer 与大语言模型:第9章 LayerNorm 归一化层
人工智能·深度学习·机器学习·transformer
ZGIAI6 小时前
知识库有结果,不等于召回率合格
人工智能·架构
东小西6 小时前
【SAA实战】第 1 篇:ReactAgent 入门——先撸个"会调工具的助手"跑起来
java·人工智能·spring