记录踩过的坑-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 小时前
LLM API 安全防线:从 OpenCode 盗刷事件到 LiteLLM 多模型容灾实操
人工智能·后端·架构
程序员cxuan1 小时前
我用 WorkBuddy + ima 把公众号文章做成了知识库。
人工智能·后端·程序员
Code_Artist1 小时前
AI 终于学会写正确的汉字了?GPT Image 2.0 到底做对了什么?
人工智能·chatgpt·openai
程序员cxuan2 小时前
玩了一天 REA,我号快没了
人工智能·后端·程序员
阿里云大数据AI技术2 小时前
聚数成湖,以智驭行:卓驭如何构建移动物理 AI 的数据底座
人工智能·spark
卷无止境2 小时前
暗流与破局:AI时代的代码安全审查工具全景指南
后端·python
武子康3 小时前
150毫秒和2400毫秒:同一 Agent 任务的两种延迟
人工智能·后端·agent
暖心hebbie设计学习3 小时前
GitHub 热榜周报(10.19)|5 个把 AI 装回本地的开源项目:多 agent 控制台、本地语音、节点式生成(含技术看点)
人工智能·github
猪脚踏浪3 小时前
open webui 在docker容器里跑,并且是在内网断绝互联网的环境下。生成ppt
人工智能
海边捡石子3 小时前
FreeSWITCH 入门:把电话系统接入语音客服机器人
人工智能·后端