-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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]
- Create a blank VM on Azure with a Windows 10 image
- Install VS Code
- Open user settings.json and opt in the new discovery experiment:
"python.experiments.optInto": [
"pythonDiscoveryModule"
],
- Install the Python extension
- Create a Python file
- 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.