You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多
文档控制台
免费开始使用

pip安装vllm时遭遇subprocess-exited-with-error错误的解决方案求助

pip安装vllm时遭遇subprocess-exited-with-error错误的解决方案求助

我最近尝试用pip安装vllm包,执行命令:

pip install vllm

但返回了报错,核心问题是安装构建依赖时失败,具体的错误输出如下:

Collecting vllm
Using cached vllm-0.10.2.tar.gz (10.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Collecting cmake>=3.26.1
Using cached cmake-4.1.0-py3-none-macosx_10_10_universal2.whl.metadata (6.5 kB)
Collecting ninja
Using cached ninja-1.13.0-py3-none-macosx_10_9_universal2.whl.metadata (5.1 kB)
Collecting packaging>=24.2
Using cached packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
Collecting setuptools<80.0.0,>=77.0.3
Using cached setuptools-79.0.1-py3-none-any.whl.metadata (6.5 kB)
Collecting setuptools-scm>=8.0
Using cached setuptools_scm-9.2.0-py3-none-any.whl.metadata (7.7 kB)
ERROR: Could not find a version that satisfies the requirement torch==2.8.0 (from versions: 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.8.0
[end of output]

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

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

我的当前环境是:

python --version
# 输出:Python 3.12.2

我看到错误里提到找不到torch==2.8.0的版本,于是尝试执行pip install --upgrade torch升级PyTorch,但升级完成后再安装vllm还是报同样的错误。

想请教一下大家,这个错误的原因是什么?有没有可行的解决方法?谢谢!

火山引擎 最新活动