Skip to content

Prefer python over python3 in Unix environments - #992

Closed
zaniebot wants to merge 2 commits into
mainfrom
zb/prefer-python-in-virtualenvs
Closed

zaniebot wants to merge 2 commits into
mainfrom
zb/prefer-python-in-virtualenvs

Conversation

@zaniebot

@zaniebot zaniebot commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Unix environment discovery prefers bin/python3 even when bin/python exists. This differs from the interpreter exposed by an activated environment and from pip's handling of directory-valued --python arguments.

Prefer bin/python, while retaining bin/python3 as a fallback for installations that omit the unversioned executable. This reverses the precedence introduced in astral-sh#3798 without removing support for python3-only layouts. Explicit executable paths and version-specific PATH discovery are unchanged.

@astral-automations-bot astral-automations-bot Bot added bug Something isn't working area:uv-python Related to the uv python interface labels Sep 9, 2026
@zanieb zanieb changed the title Prefer python in Unix environments Prefer python over python3 in Unix environments Sep 9, 2026
@zanieb
zanieb marked this pull request as ready for review September 9, 2026 15:41
@astral-automations-bot

Copy link
Copy Markdown

Promoted to #21559.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uv-python Related to the uv python interface bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants