当前位置: 首页> 财经> 股票 > 【已解决】ERROR: No matching distribution found for torch.安装torch一次性解决方法

【已解决】ERROR: No matching distribution found for torch.安装torch一次性解决方法

时间:2025/7/9 0:49:34来源:https://blog.csdn.net/qq_40374604/article/details/140767007 浏览次数:0次

建议收藏这个方法,python pip 安装依赖失败,多数都可以通过这个方法解决

文章目录

    • 环境
    • 异常
    • 原因
    • 直接解决方案
    • 成功

环境

python 安装 torch


异常

(base) ➜  ComfyUI git:(master) pip install -i https://pypi.mirrors.ustc.edu.cn/simple torch
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

原因

无法拉取,可能是镜像问题


直接解决方案

手动下载到本地,本地安装。

下载地址:(选择对应操作系统、系统架构和 python版本的依赖)

https://download.pytorch.org/whl/torch_stable.html

命令

pip install ~/Downloads/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl

解释:(一定选择对应版本的依赖,如果找不到对应依赖,可以升降 python 版本)

torch-1.9.1-cp39-none-macosx_11_0_arm64.whlcp39: 指 python3.9macosx: 操作系统arm64: 系统架构

成功

Web UI 地址 :

http://127.0.0.1:8188/

启动日志:

在这里插入图片描述

UI 界面效果:

在这里插入图片描述

关键字:【已解决】ERROR: No matching distribution found for torch.安装torch一次性解决方法

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: