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

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

文章目录

环境

python 安装 torch


异常

bash 复制代码
(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版本的依赖)

bash 复制代码
https://download.pytorch.org/whl/torch_stable.html

命令

bash 复制代码
pip install ~/Downloads/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl

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

bash 复制代码
torch-1.9.1-cp39-none-macosx_11_0_arm64.whl

cp39: 指 python3.9

macosx: 操作系统

arm64: 系统架构

成功

Web UI 地址 :

bash 复制代码
http://127.0.0.1:8188/

启动日志:

UI 界面效果:

相关推荐
MoRanzhi120318 小时前
Python 实现:从数学模型到完整控制台版《2048》游戏
数据结构·python·算法·游戏·数学建模·矩阵·2048
2401_8414956418 小时前
【数据结构】基于BF算法的树种病毒检测
java·数据结构·c++·python·算法·字符串·模式匹配
图灵信徒18 小时前
R语言绘图与可视化第六章总结
python·数据挖掘·数据分析·r语言
封奚泽优19 小时前
使用Labelme进行图像标注
开发语言·python·labelme
檐下翻书17319 小时前
智能医疗大模型在医生培训中的应用案例
python
码界筑梦坊19 小时前
243-基于Django与VUE的笔记本电脑数据可视化分析系统
vue.js·python·信息可视化·数据分析·django·毕业设计·echarts
蛋仔聊测试20 小时前
Playwright 中route 方法模拟测试数据(Mocking)详解
前端·python·测试
今天没有盐20 小时前
Pandas缺失值处理完全指南:从基础操作到高级技巧
python·pycharm·编程语言