How to change the default python path for a workspace (not a folder) in VSCode

1226 views python

I'm working with VSCode and i am selecting Terminal > New Terminal to start a new terminal session. The problem is, no matter which file is currently selected or which folder I'm currently working out of, the default terminal keeps starting with the a specific virtual Environment for one of the folders in my workspace. How can i change this?new integrated terminal session

answered question

1 Answer


You will need to change the interpreter. At the bottom left where the editor says which Python interpreter has been selected ('Python*'), you can click on that and you will be provided with list of interpreters to select from. Alternatively, in windows press ctrl+shift+P and type 'select interpreter' and then select 'Python: Select Interpreter' option.

If you don't see the desired interpreter in the list, you can try adding it to the workspace settings (again ctrl+shift+P and type workspace settings). Under workspace settings search for 'python.pythonpath'. You should see an option to update the path to whichever interpreter you want to.

More details here

posted this

Have an answer?


Please login first before posting an answer.