You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resolve system variables in the defaultInterpreterPath entry #18351
Have a workspace with Python files and a .code-workspace file
Create a subfolder in the workspace, and then create a virtual environment in that subfolder (any flavor of Python 3 works): cd subfolder; python3 -m venv .venv
On windows the path to the python executable will be something like ${workspaceFolder}/<folder>/.venv/Scripts/python.exe, while on Unix it will be ${workspaceFolder}/<folder>/.venv/bin/python.exe
Open the workspace and activate the extension
Run the Select Interpreter command, and verify that the path in the Use Python from 'python.defaultInterpreterPath' setting entry is a valid path that contains no system variables
Select that entry, and verify that it is a usable Python interpreter (the extension works, and operations like linting or formatting work)
Activity
kimadeline commentedon Jan 25, 2022
Repro steps:
.code-workspacefilecd subfolder; python3 -m venv .venv.code-workspacefile:{ "settings": { "python.defaultInterpreterPath": "${workspaceFolder}/path/to/python.exe", } }On windows the path to the python executable will be something like
${workspaceFolder}/<folder>/.venv/Scripts/python.exe, while on Unix it will be${workspaceFolder}/<folder>/.venv/bin/python.exeSelect Interpretercommand, and verify that the path in theUse Python from 'python.defaultInterpreterPath' settingentry is a valid path that contains no system variablesrchiodo commentedon Jan 26, 2022
/verified