Skip to content

Conversation

@yankay
Copy link
Contributor

@yankay yankay commented Sep 2, 2025

Purpose

Fix: #24063

This PR fixes issues when running python collect_env.py and vllm collect-env inside a uv venv environment. The changes ensure correct environment detection and reporting, resolving errors and inconsistencies specific to uv venv setups.

Test Plan

uv venv
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm collect-env # or python vllm/collect_env.py

Test Result

After change:

(vllm) root@gpu-3090:~/oss/vllm# python vllm/collect_env.py
Collecting environment information...
uv is set

If no change, print error Could not collect pip list output (pip or uv module not available), the same as #24063


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fix for detecting uv virtual environments in collect_env.py, which is a good improvement for compatibility. The new is_uv_venv function correctly checks for both the UV environment variable and the uv entry in pyvenv.cfg. I've suggested a small improvement to make the file parsing more robust and efficient.

@yankay yankay changed the title Fix collect_env.py and vllm collect-env compatibility with uv venv [BugFix] collect_env.py and vllm collect-env compatibility with uv venv Sep 2, 2025
@yankay yankay changed the title [BugFix] collect_env.py and vllm collect-env compatibility with uv venv [BugFix] python collect_env.py and vllm collect-env compatibility with uv venv Sep 2, 2025
@yankay yankay force-pushed the fix-collect-env branch 2 times, most recently from 7a4a366 to f993c37 Compare September 2, 2025 03:35
@yankay
Copy link
Contributor Author

yankay commented Sep 3, 2025

Hi @DarkLight1337 @yihong0618,

Would it be possible to kindly ask you to review this PR?

@yihong0618
Copy link
Contributor

Hi @DarkLight1337 @yihong0618,

Would it be possible to kindly ask you to review this PR?

I think its good

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgoin is OOO so I'll just stamp this

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) September 8, 2025 02:11
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 8, 2025
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
auto-merge was automatically disabled September 9, 2025 08:29

Head branch was pushed to by a user without write access

@DarkLight1337 DarkLight1337 merged commit 2eb9986 into vllm-project:main Sep 10, 2025
37 checks passed
skyloevil pushed a commit to skyloevil/vllm that referenced this pull request Sep 13, 2025
… with uv venv (vllm-project#24066)

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
… with uv venv (vllm-project#24066)

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
… with uv venv (vllm-project#24066)

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
… with uv venv (vllm-project#24066)

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: In uv venv, running python collect_env.py will return error.

3 participants