vllm - 💡(How to fix) Fix [Installation]: Build vllm from source fail [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#37288Fetched 2026-04-08 00:48:15
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

git clone https://github.com/vllm-project/vllm.git cd vllm uv venv --python 3.12 --seed --managed-python source .venv/bin/activate VLLM_USE_PRECOMPILED=1 uv pip install -e . × Failed to build vllm @ file:///Users/wyattwong/GitHub/vllm ├─▶ Failed to resolve requirements from build-system.requires ├─▶ No solution found when resolving: cmake>=3.26.1, ninja, packaging>=24.2, setuptools>=77.0.3, <81.0.0, setuptools-scm>=8.0, torch==2.10.0, wheel, jinja2 ╰─▶ Because torch==2.10.0 has no wheels with a matching platform tag (e.g., macosx_15_0_x86_64) and you require torch==2.10.0, we can conclude that your requirements are unsatisfiable.

  hint: Wheels are available for `torch` (v2.10.0) on the following platforms: `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, `macosx_11_0_arm64`, `win_amd64`

grep -v '^torch==' requirements/build.txt | uv pip install -r - Resolved 12 packages in 173ms Installed 12 packages in 361ms

  • build==1.4.0
  • cmake==4.2.3
  • jinja2==3.1.6
  • markupsafe==3.0.3
  • ninja==1.13.0
  • packaging==26.0
  • protobuf==7.34.0
  • pyproject-hooks==1.2.0
  • regex==2026.2.28
  • setuptools==80.10.2
  • setuptools-scm==9.2.2
  • wheel==0.46.3

uv pip install -e . --no-build-isolation × Failed to build vllm @ file:///Users/wyattwong/GitHub/vllm ├─▶ The build backend returned an error ╰─▶ Call to setuptools.build_meta.prepare_metadata_for_build_editable failed (exit status: 1)

  [stderr]
  Traceback (most recent call last):
    File "<string>", line 14, in <module>
    File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 484, in prepare_metadata_for_build_editable
      return self.prepare_metadata_for_build_wheel(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 378, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 17, in <module>
  ModuleNotFoundError: No module named 'torch'

  hint: This error likely indicates that `vllm` depends on `torch`, but doesn't declare it as a build dependency. If `vllm` is a first-party package, consider adding `torch` to
  its `build-system.requires`. Otherwise, either add it to your `pyproject.toml` under:

  [tool.uv.extra-build-dependencies]
  vllm = ["torch"]

  or `uv pip install torch` into the environment and re-run with `--no-build-isolation`.

Root Cause

git clone https://github.com/vllm-project/vllm.git
cd vllm
uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
VLLM_USE_PRECOMPILED=1 uv pip install -e .
  × Failed to build `vllm @ file:///Users/wyattwong/GitHub/vllm`
  ├─▶ Failed to resolve requirements from `build-system.requires`
  ├─▶ No solution found when resolving: `cmake>=3.26.1`, `ninja`, `packaging>=24.2`, `setuptools>=77.0.3, <81.0.0`, `setuptools-scm>=8.0`, `torch==2.10.0`, `wheel`, `jinja2`
  ╰─▶ Because torch==2.10.0 has no wheels with a matching platform tag (e.g., `macosx_15_0_x86_64`) and you require torch==2.10.0, we can conclude that your requirements are
      unsatisfiable.

Code Example

The output of `python collect_env.py`

---

git clone https://github.com/vllm-project/vllm.git
cd vllm
uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
VLLM_USE_PRECOMPILED=1 uv pip install -e .
  × Failed to build `vllm @ file:///Users/wyattwong/GitHub/vllm`
  ├─▶ Failed to resolve requirements from `build-system.requires`
  ├─▶ No solution found when resolving: `cmake>=3.26.1`, `ninja`, `packaging>=24.2`, `setuptools>=77.0.3, <81.0.0`, `setuptools-scm>=8.0`, `torch==2.10.0`, `wheel`, `jinja2`
  ╰─▶ Because torch==2.10.0 has no wheels with a matching platform tag (e.g., `macosx_15_0_x86_64`) and you require torch==2.10.0, we can conclude that your requirements are
      unsatisfiable.

      hint: Wheels are available for `torch` (v2.10.0) on the following platforms: `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, `macosx_11_0_arm64`, `win_amd64`

grep -v '^torch==' requirements/build.txt | uv pip install -r -
Resolved 12 packages in 173ms
Installed 12 packages in 361ms
 + build==1.4.0
 + cmake==4.2.3
 + jinja2==3.1.6
 + markupsafe==3.0.3
 + ninja==1.13.0
 + packaging==26.0
 + protobuf==7.34.0
 + pyproject-hooks==1.2.0
 + regex==2026.2.28
 + setuptools==80.10.2
 + setuptools-scm==9.2.2
 + wheel==0.46.3

uv pip install -e . --no-build-isolation
  × Failed to build `vllm @ file:///Users/wyattwong/GitHub/vllm`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.prepare_metadata_for_build_editable` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 484, in prepare_metadata_for_build_editable
          return self.prepare_metadata_for_build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 378, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 17, in <module>
      ModuleNotFoundError: No module named 'torch'

      hint: This error likely indicates that `vllm` depends on `torch`, but doesn't declare it as a build dependency. If `vllm` is a first-party package, consider adding `torch` to
      its `build-system.requires`. Otherwise, either add it to your `pyproject.toml` under:

      [tool.uv.extra-build-dependencies]
      vllm = ["torch"]

      or `uv pip install torch` into the environment and re-run with `--no-build-isolation`.
RAW_BUFFERClick to expand / collapse

Your current environment

The output of `python collect_env.py`

/Users/wyattwong/GitHub/vllm/vllm/init.py:7: RuntimeWarning: Failed to read commit hash: No module named 'vllm._version' from .version import version, version_tuple # isort:skip Traceback (most recent call last): File "/Users/wyattwong/GitHub/vllm/collect_env.py", line 20, in <module> from vllm.envs import environment_variables File "/Users/wyattwong/GitHub/vllm/vllm/init.py", line 14, in <module> import vllm.env_override # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/wyattwong/GitHub/vllm/vllm/env_override.py", line 87, in <module> import torch ModuleNotFoundError: No module named 'torch'

How you are installing vllm

I followed the vLLM Developing Guide and got the following error messages:

git clone https://github.com/vllm-project/vllm.git
cd vllm
uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
VLLM_USE_PRECOMPILED=1 uv pip install -e .
  × Failed to build `vllm @ file:///Users/wyattwong/GitHub/vllm`
  ├─▶ Failed to resolve requirements from `build-system.requires`
  ├─▶ No solution found when resolving: `cmake>=3.26.1`, `ninja`, `packaging>=24.2`, `setuptools>=77.0.3, <81.0.0`, `setuptools-scm>=8.0`, `torch==2.10.0`, `wheel`, `jinja2`
  ╰─▶ Because torch==2.10.0 has no wheels with a matching platform tag (e.g., `macosx_15_0_x86_64`) and you require torch==2.10.0, we can conclude that your requirements are
      unsatisfiable.

      hint: Wheels are available for `torch` (v2.10.0) on the following platforms: `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, `macosx_11_0_arm64`, `win_amd64`

grep -v '^torch==' requirements/build.txt | uv pip install -r -
Resolved 12 packages in 173ms
Installed 12 packages in 361ms
 + build==1.4.0
 + cmake==4.2.3
 + jinja2==3.1.6
 + markupsafe==3.0.3
 + ninja==1.13.0
 + packaging==26.0
 + protobuf==7.34.0
 + pyproject-hooks==1.2.0
 + regex==2026.2.28
 + setuptools==80.10.2
 + setuptools-scm==9.2.2
 + wheel==0.46.3

uv pip install -e . --no-build-isolation
  × Failed to build `vllm @ file:///Users/wyattwong/GitHub/vllm`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.prepare_metadata_for_build_editable` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 484, in prepare_metadata_for_build_editable
          return self.prepare_metadata_for_build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 378, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/Users/wyattwong/GitHub/vllm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 17, in <module>
      ModuleNotFoundError: No module named 'torch'

      hint: This error likely indicates that `vllm` depends on `torch`, but doesn't declare it as a build dependency. If `vllm` is a first-party package, consider adding `torch` to
      its `build-system.requires`. Otherwise, either add it to your `pyproject.toml` under:

      [tool.uv.extra-build-dependencies]
      vllm = ["torch"]

      or `uv pip install torch` into the environment and re-run with `--no-build-isolation`.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

Fix Plan

To resolve the issue, follow these steps:

  • Install the required torch package:
    • Run uv pip install torch in your terminal.
  • Update the pyproject.toml file to include torch as a build dependency:
    • Add the following lines to the [tool.uv.extra-build-dependencies] section:

[tool.uv.extra-build-dependencies] vllm = ["torch"]

* Re-run the installation command with `--no-build-isolation`:
  * Run `uv pip install -e . --no-build-isolation` in your terminal.

Example `pyproject.toml` snippet:
```toml
[tool.uv.extra-build-dependencies]
vllm = [
    "torch",
    # Other dependencies...
]

Verification

After completing the above steps, verify that the installation is successful by running:

  • uv pip install -e . --no-build-isolation
  • python collect_env.py to ensure that the environment is correctly set up.

Extra Tips

  • Make sure to check the documentation for any specific requirements or dependencies for your project.
  • If you encounter further issues, try searching for relevant solutions or seeking help from the project's community or support channels.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Installation]: Build vllm from source fail [1 participants]