记录踩过的坑-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")
相关推荐
Lei活在当下8 小时前
【AI手记系列-2026/6/18】iSparto & Harness,Caveman 以及AI时代的生存指南
人工智能·llm·openai
冬奇Lab9 小时前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
冬奇Lab10 小时前
Agent 系列(22):Context Engineering 深度——三种上下文管理策略的量化对比
人工智能·agent
hboot10 小时前
AI工程师第二课 - 数据处理
人工智能·python·数据分析
程序员cxuan10 小时前
DeepSeek 杀入多模态,识图功能正式上线!
人工智能·后端·程序员
米小虾12 小时前
告别单打独斗:2026年多Agent协作架构实战指南
人工智能·agent
IT_陈寒13 小时前
SpringBoot这个自动配置坑我跳了三次
前端·人工智能·后端
Larcher13 小时前
AI Loop:让AI像人一样自主完成任务的核心机制
javascript·人工智能·设计模式
牧艺13 小时前
从零到协同:构建类飞书在线文档系统的五个技术重难点
前端·人工智能