Skip to content

Overwriting python.defaultInterpreterPath on first startup #1082

@jdegenstein

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.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions