forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Closed
Copy link
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseBug didn't exist in a previous releaseverifiedVerification succeededVerification succeeded
Milestone
Description
Environment data
- VS Code version: 1.43.1
- Extension version (available under the Extensions sidebar): 2020.3.69010
- OS and version: Windows 10 64-bit
- Python version: 3.8.2
Expected behaviour
An environment variable in python.pythonPath is respected across all platforms.
Actual behaviour
Works on Linux (via Remote SSH), but fails on Windows.
Steps to reproduce:
- Specify
"python.pythonPath": "{env:PYTHON_FOR_VSCODE}"insettings.json. - Set a Windows environment variable
PYTHON_FOR_VSCODEto point to an installed Python interpreter, in my caseC:\Tools\Python3\python.exe. - Restart VSCode, and open a hello.py.
- The yellow prompt "Select Python Interpreter" persists.
- When it's clicked, a combobox comes to say
current: {env:PYTHON_FOR_VSCODE}, and lists my locally installed Python interpreters, includingC:\Tools\Python3\python.exe. Choosing it works fine, but defeats the purpose of using an environment variable. - In VSCode's Terminal,
%PYTHON_FOR_VSCODE% --versionruns as expected.
- When it's clicked, a combobox comes to say
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseBug didn't exist in a previous releaseverifiedVerification succeededVerification succeeded