尽管安装了 Torch,安装 auto-gptq 仍无法工作(错误 Torch 未安装,请先安装 Torch!)

问题描述 投票:0回答:1

我尝试在本地安装 auto-gptq,但收到此错误:

Collecting auto-gptq
  Using cached auto_gptq-0.3.2.tar.gz (63 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 4294967295
  ╰─> [1 lines of output]
      torch is not installed, please install torch first!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 4294967295
╰─> See above for output.

注意:此错误源自子进程,并且可能不是 pip 的问题。

我安装了手电筒:

PS C:\Users\danie> C:\Users\danie\AppData\Local\Programs\Python\Python311\python.exe -m pip install torch        
Requirement already satisfied: torch in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (2.0.1)
Requirement already satisfied: filelock in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from torch) (3.12.2)
Requirement already satisfied: typing-extensions in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from torch) (4.7.1)
Requirement already satisfied: sympy in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from torch) (1.12)
Requirement already satisfied: networkx in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from torch) (3.1)
Requirement already satisfied: jinja2 in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from torch) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from jinja2->torch) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in c:\users\danie\appdata\local\programs\python\python311\lib\site-packages (from sympy->torch) (1.3.0)

但我仍然收到错误。这是为什么?

pytorch torch
1个回答
2
投票

为了解决这个问题,我使用了以下方法:

pip install auto_gptq==0.2.0

因为可能新版本的

auto_gptq
支持不太好。

© www.soinside.com 2019 - 2024. All rights reserved.