Skip to content

Environment discovery experiment is discovering python.exe that directs to Windows store  #15356

@luabud

Description

@luabud

Environment data

  • VS Code version: 1.53.0
  • Extension version (available under the Extensions sidebar): latest insiders
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): N/A
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: N/A

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

In a Windows machine where there's no Python installed, we should prompt users with the "Python is not installed" notification.

Actual behaviour

In a Windows machine where there's no Python installed, the extension is discovering and selecting the python.exe at ~\AppData\Local\Microsoft\WindowsApps. From what I understand, this executable comes with Windows and it's meant to open the Windows store when Python is not installed (or not on PATH actually, I believe). We should not be displaying it as an option to be selected in the workspace.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create a blank VM on Azure with a Windows 10 image
  2. Install VS Code
  3. Open user settings.json and opt in the new discovery experiment:
    "python.experiments.optInto": [
        "pythonDiscoveryModule"
    ],
  1. Install the Python extension
  2. Create a Python file
  3. See that an interpreter was selected. If you add a print("hello world") and click the run button, you'll see it will not execute the file, as the executable is not an actual interpreter.

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions