Skip to content

Conversation

@esafak
Copy link
Contributor

@esafak esafak commented Aug 14, 2025

On Windows, when creating a virtual environment with a Python 3.x interpreter, ensure that python3.exe and python3 executables are created in the virtual environment's scripts directory.

This makes the behavior on Windows more consistent with POSIX platforms and user expectations, regardless of whether the source Python executable is named python.exe or python3.exe.

Fixes #2774

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

On Windows, when creating a virtual environment with a Python 3.x interpreter, ensure that `python3.exe` and `python3` executables are created in the virtual environment's scripts directory.

This makes the behavior on Windows more consistent with POSIX platforms and user expectations, regardless of whether the source Python executable is named `python.exe` or `python3.exe`.

Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
@gaborbernat gaborbernat enabled auto-merge (squash) August 14, 2025 05:11
@gaborbernat gaborbernat merged commit 916375d into pypa:main Aug 14, 2025
45 checks passed
@esafak esafak deleted the feat/2774-win-python3-symlinks branch August 14, 2025 12:36
gaborbernat pushed a commit to gaborbernat/virtualenv that referenced this pull request Oct 10, 2025
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python3.exe missing on windows when creating a virtualvenv

2 participants