Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup python path in Visual Studio Code?

I tried to debug python code on Visual Studio Code (version 1.15) but it says that I should setup python path.

So, can someone help out?

like image 754
Garde Des Ombres Avatar asked May 31 '26 10:05

Garde Des Ombres


1 Answers

In the File Explorer, look for a file named settings.json (it should be under a folder named .vscode, and if you don't see it, check that you've saved your work as a workspace and read about Workspace Settings).

Click on it, and when it opens in the editor, add the path to your Python executable, like this (but with your own path):

// Place your settings in this file to overwrite default and user settings.
{
    "python.pythonPath": "c:/python27amd64/python.exe"
}

Save it and try it.

See also: https://code.visualstudio.com/docs/python/environments

like image 156
Paul Claessen Avatar answered Jun 02 '26 23:06

Paul Claessen



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!