Skip to content

Overwriting python.defaultInterpreterPath on first startup #1082

Closed
microsoft/vscode-python
#25736

Description

@jdegenstein

Firstly, I am not sure if this repo or https://github.com/microsoft/python-environment-tools is the correct place for this issue.

My setup is the following, prepared in CI and downloaded to my local machine :

  • Portable VSCode (1.107.1)
  • python-build-standalone (basically a portable python maintained by Astral.sh)
  • settings.json that has a full path to the python.exe interpreter set before first run of VSCode (via python.defaultInterpreterPath)
  • VSCode extensions:
    • Microsoft Python (v2025.20.1)
    • Microsoft Python Environments (v1.14.0)
    • ...

What happens is that this extension or pet.exe is overwriting python.defaultInterpreterPath with a system installation of python. This happens quickly during the first startup of VSCode.

I have verified that the above python.exe is working correctly and is accessible via the path set in settings.json. I am able to work around by setting "python.useEnvironmentsExtension": false. So far I have only tested on windows.

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    confirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.
    and removed on Jan 7, 2026
  2. added
    importantIssue identified as high-priority
    and removed
    confirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.
    on Jan 13, 2026
  3. eleanorjboyd commented on Jan 14, 2026

    @eleanorjboyd
    Contributor

    able to repro but in a very weird set of steps...

    The video caught it but here is it written:

    1. set it
    2. restart vs code
    3. was still set right on open
    4. close the settings editor
    5. reopen the settings editor
    6. the defaultInterpreterPath was changed
    override-defaultInterpreter.mov
  4. jdegenstein commented on Jan 27, 2026

    @jdegenstein
    Author

    Thank you!

  5. locked as resolved and limited conversation to collaborators on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityneeds PRverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions