【已解决】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 界面效果:

相关推荐
知行合一。。。5 小时前
Python--04--数据容器(总结)
开发语言·python
架构师老Y5 小时前
008、容器化部署:Docker与Python应用打包
python·容器·架构
lifewange5 小时前
pytest-类中测试方法、多文件批量执行
开发语言·python·pytest
pluvium276 小时前
记对 xonsh shell 的使用, 脚本编写, 迁移及调优
linux·python·shell·xonsh
2401_827499996 小时前
python项目实战09-AI智能伴侣(ai_partner_5-6)
开发语言·python
PD我是你的真爱粉6 小时前
MCP 协议详解:从架构、工作流到 Python 技术栈落地
开发语言·python·架构
ZhengEnCi6 小时前
P2G-Python字符串方法完全指南-split、join、strip、replace的Python编程利器
python
是小蟹呀^6 小时前
【总结】LangChain中工具的使用
python·langchain·agent·tool
宝贝儿好7 小时前
【LLM】第二章:文本表示:词袋模型、小案例:基于文本的推荐系统(酒店推荐)
人工智能·python·深度学习·神经网络·自然语言处理·机器人·语音识别
王夏奇7 小时前
pythonUI界面弹窗设置的几种办法
python·ui