【已解决】ERROR:torch安装无匹配分发问题——一次性解决方案指南

建议收藏这个方法,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.whl
    
    cp39: 指 python3.9
    
    macosx: 操作系统
    
    arm64: 系统架构
    

    成功

    Web UI 地址 :

    http://127.0.0.1:8188/
    

    启动日志:

    UI 界面效果:

    作者:JavaPub-rodert

    物联沃分享整理
    物联沃-IOTWORD物联网 » 【已解决】ERROR:torch安装无匹配分发问题——一次性解决方案指南

    发表回复