How to Run Python in VS Code?


This tutorial will teach you how to run python in vs code.

Why VS Code?

VS Code has an intuitive and customizable user interface that allows developers to tailor their coding environment to their needs.

VS Code can run on Windows, macOS, and Linux, making it accessible to many developers.

Here is a step-by-step guide on how to run Python in VS Code.

Install Python

If you haven’t already done so, you’ll need to install Python on your Windows computer. You can download the latest version of Python. Follow the installation instructions here to install Python on your computer.

Install Visual Studio Code

  • Go to the Visual Studio Code website ( and click the “Download” button.
  • Select the appropriate download option (Windows, Mac, or Linux) depending on your operating system.
  • Once the download is complete, open the installer file and follow the prompts to install Visual Studio Code on your computer.

Open Visual Studio Code

Once Visual Studio Code is installed, open it by double-clicking the application icon.

Install Python Extension

Install the Python Extension for Visual Studio Code.

Open Visual Studio Code, and go to the “Extensions” view by clicking on the “Extensions” icon in the left-hand panel or by pressing “Ctrl+Shift+X” on your keyboard.

How to Run Python on VS Code

Go to the “File” menu and select “New File”. In the new file, type your Python code.

Save the Python File: Save your Python file by going to the “File” menu and selecting “Save As”. Choose a location and name for your file and give it a “.py” file extension.

Run the Python File: To run your Python file, go to the “Run” menu and select “Run Without Debugging” or use the keyboard shortcut “Ctrl+F5”. This will run your Python code in the Terminal window.

Now, you have successfully installed python on your system.

In the next module, you will learn the fundamentals of the python programming language from an absolute beginner’s perspective.

Hold tight and learn python in an easy and fun way.

Was this helpful?

Related Articles:

Recent Articles:

5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x