📢 This article was translated by gemini-2.5-flash
Let’s Get Started
First off, after you’ve got VS Code and Python installed and environment variables all set:
Fire up VS Code, head over to the Extensions view, search for ‘Python’, and install it.
When you create a new Python (.py) file in the Explorer, VS Code usually whips up a settings.json file in your .vscode folder. If it doesn’t, just create it manually.
Crack open settings.json and drop in this config:
| |
Hop back to your Python file. You’ll likely see a warning pop up in the bottom-right of VS Code; hit ‘Download’.
Hit CTRL+SHIFT+P, then type Python: Select Interpreter.
Just pick your installed Python interpreter from the list.
Got a launch.json file in your .vscode folder? You’ll want to add this snippet to its configurations array:
| |