How to Run Python in VSCode / VS Code (Visual Studio Code) on Windows



How to Run Python in VSCode / VS Code (Visual Studio Code) on Windows

How to Run Python in VSCode / VS Code (Visual Studio Code) on Windows

Sign Up 👻👻👉 https://semicolon.dev/YouTube
(We’re free online community, meet other makers!)

How to run Python in Visual Studio Code

0:00 How to run Python File in VSCode (visual studio code)
0:10 Install and setup Python from python.org together with py launcher
0:20 Preview of using py command in vscode terminal
0:47 Go to extensions to enable Python in vs code
1:01 Setup python extension
1:11 Open new terminal console in vscode
1:20 Executing (running) python in shell
1:30 Start a new vscode python project and save file to hello.py
2:00 New Python tab appears (lower left corner in vscode)
2:50 Running python program with python hello.py command in vscode Terminal
3:50 Outro / Select python interpreter

In this tutorial I’ll walk you through the process of running your Python files and scripts via the VS Code (visual studio code) editor, instead of your regular Mac Terminal or cmd.exe on Windows OS.

We’ll go ahead and install the latest version of Python from the official python.org website and also install the Python VSCode extension. After that we’ll type some basic Python commands in VS Code Terminal in Python bash as well as create a separate Python project with hello.py file and execute it directly from the VSCode Terminal.

Running python from vscode terminal is a lot more convenient than doing it with your standard bash/cmd/terminal since you always have your vscode open when you’re editing your code. So running python in vscode is ought to save a lot of time in the long run. Good luck out there!

Comments are closed.