Skip to content

venv with Windows Store base does not have correct sys.path #117786

Description

@zooba

Bug report

Appears to be new in 3.13.0a6, as I've been using it with a5 and it's only after updating that I noticed.

Basically, the venv's prefix and site-packages directories are not present in sys.path when the base interpreter is from a Store install, and it has the user site. I need to investigate further to figure out exactly why.

Test code:

> python3 -m venv testenv --without-pip
> testenv\Scripts\activate
> python -m site
# expect "$PWD\testenv\Scripts\Lib\site-packages" in list

If anyone wants to help check it out, the Store page for alpha releases is https://www.microsoft.com/store/apps/9PNRBTZXMB4Z

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.13only security fixes
    topic-venvRelated to the venv module
    on Apr 11, 2024
  2. self-assigned this
    on Apr 11, 2024
  3. zooba commented on Apr 11, 2024

    @zooba
    MemberAuthor

    Oh right, I did the venvlauncher refactoring for this alpha, so the breakage is 100% my fault 😆

    Part of that change was to stop smuggling __PYVENV_LAUNCHER__, but also to stop rewriting argv[0]. Those two should have cancelled each other out, but I guess with the Store packaging it doesn't.

  4. added 2 commits that reference this issue on Apr 12, 2024
  5. added a commit that references this issue on Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions