Home > OS >  Where does vscode store the python interpretter setting?
Where does vscode store the python interpretter setting?

Time:12-19

I have two folders, each containing a .vscode folder with identical settings.json files. But when I open them in VS Code (on Linux) and "Run without Debugging", one of them is run with:

/bin/python3

and the other with:

~/anaconda3/bin/python

Where is this setting stored? i.e. how does VS Code know which interpreter to pick for a particular folder?

CodePudding user response:

The setting for each workspace is in :

$HOME/.config/Code/User/workspaceStorage/*/state.vscdb

which are sqlite databases.

CodePudding user response:

Exact location of the Python interpreter path specified and how you can manually change is given officially in https://code.visualstudio.com/docs/python/environments

Easiest way to change the python interpreter under usage:

  1. Open the command palette (ctrl shift p)
  2. Type Python:Select Inerpreter
  3. If the python interpreter you want is not listed then click on "Enter Interpreter Path" and click Find.
  4. Choose the proper binary path of the python you want to use.

This way Settings file will automatically be updated and you don't have to worry about its location.

  • Related