Closed
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_VSCODE
to 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% --version
runs as expected.
- When it's clicked, a combobox comes to say