记录踩过的坑-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")
相关推荐
joshchen21521 小时前
强化学习基础(赵世钰)第一章
人工智能·深度学习·算法·机器学习·强化学习
拜特说21 小时前
RAG 进化史:从基础检索到智能体驱动
人工智能
weixin_3981877521 小时前
YOLOv11改进:全维度动态卷积ODConv与C3k2模块创新
人工智能·yolo
李昊哲小课21 小时前
Hermes Agent Dashboard 二次开发指南
人工智能·智能体·hermesagent
MATLAB代码顾问21 小时前
RAG技术详解:从检索增强生成到知识库问答实战
人工智能
东方佑1 天前
色块语义Token化器V3:用语义压缩重构图像编码
人工智能·计算机视觉·重构
szial1 天前
Python Click 教程:从函数到专业命令行工具
开发语言·python
u0119608231 天前
ray 依赖分发
python
沐泽__1 天前
欧氏距离、余弦相似度(cosin)、点积 区别与用途详解(附实例)
人工智能·机器学习
victory04311 天前
DeepSeek-V4知识点讲解记录
人工智能