Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio code is not loading my python interpreters

I've been using a python interpreter that I set in my venv the whole time for this project. Recently I changed my python interpreter which I've set as a default interpreter in my user settings like the vs docs vs code python environments describes it and also set in my JSON settings file refuses to load instead. I'm getting the default conda python interpreter with no other options.

here is my Json file:

settings.json

{
  "python.defaultInterpreterPath": "C:/Users/houst/Envs/Mach/Scripts/python.exe"
}
like image 769
Houston Mhlongo Avatar asked Aug 15 '26 01:08

Houston Mhlongo


1 Answers

I think you should use the \ instead of the / in the path. For safety just copy paste the path from the windows explorer.
Another Solution : Writing the path in Json should definitely work. But I prefer using the functionality vscode provides. Now come to my solution. press ctrl+shift+p to open the search bar. now type >Python:Select Interpreter. This should allow you to select the existing interpreter or to add the interpreter path in the vscode. I'm attaching a screen shot for your convenient.

VsCode Python Interpreter

You should keep in mind that, if you add the Python interpreted path in environment path of your system, vscode should automatically find the interpreter.

like image 77
Sifat Amin Avatar answered Aug 17 '26 15:08

Sifat Amin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!