The Please open a workspace to select the Python Interpreter.
error is simple.
I believe you've opened a VS Code window without selecting any folder.
As such, no workspace was opened, and workspace-specific settings cannot be set.
If you wish to set a default python interpreter for all workspaces, open settings with Ctrl+Shift+P
, Preferences: Open User Settings
and search for Python: Default Interpreter Path
. Otherwise, if you want to set it for only the current workspace, use Preferences: Open Workspace Settings
.
In your case, you wish to set it to C:\Users<User>\AppData\Local\Programs\Python\Python36-32\python.exe
. Though I would suggest using a virtual environment. If you edit settings.json
directly instead of using the GUI:
{
"python.defaultInterpreterPath": "C:\Users<User>\AppData\Local\Programs\Python\Python36-32\python.exe"
}
Detailed instructions can be found in the documentation "Manually specify an interpreter", including using environment variables as the interpreter's path.
Also, "python.pythonPath"
has been deprecated. Therefore most other answers are outdated:
2021.6.0 (16 June 2021)
5. Added python.defaultInterpreterPath setting at workspace level when in pythonDeprecatePythonPath experiment. (#16485)
8. Show python.pythonPath deprecation prompt when in pythonDeprecatePythonPath experiment. (#16485)
2020.7.0 (16 July 2020)
9. Prompt users that we have deleted pythonPath from their workspace settings when in Deprecate PythonPath experiment. (#12533)
2020.5.0 (12 May 2020)
6. Do a one-off transfer of existing values for python.pythonPath setting to new Interpreter storage if in DeprecatePythonPath experiment. (#11052)
8. Added prompt asking users to delete python.pythonPath key from their workspace settings when in Deprecate PythonPath experiment. (#11108)
12. Rename string ${config:python.pythonPath} which is used in launch.json to refer to interpreter path set in settings, to ${config:python.interpreterPath}. (#11446)
2020.4.0 (20 April 2020)
13. Added a user setting python.defaultInterpreterPath to set up the default interpreter path when in Deprecate PythonPath experiment. (#11021)