Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Setting Up Python in Visual Studio Code!

VSCode Cover Photo

This guide will walk you through the process of setting up Python in VS Code with all the essential tools for development.


Prerequisites

  • 📦 How to Python installed on your system Learn more

Visual Studio Code installed Download VS Code

Download Python


Install Python Extension in VS Code

📦 Step 2: Open VS Code

Download Python

📦 Step 3: Go to the Extensions tab on the left sidebar or press Ctrl+Shift+X

Download Python

📦 Step 4: Search for "Python" by Microsoft and click Install

Download Python

📦 Step 5: Check Python Installation

  • Go to Terminal > New Terminal

Download Python

📦 Step 6: Type the following command:

python3 --version
python3 -V

Download Python

If you see something like Python 3.x.x, you're good to go!


Create a Python File

  1. Click on File > Open Folder

Download Python

  1. Select Folder & Create Folder

Download Python

  1. Save the file with .py extension (e.g., hello.py)

vsCode

  1. Type a simple Python script:
print("Hello, VS Code!")

vsCode

Run Python Code in VS Code

  1. Click on the Run Python File button at the top right (▶️)

vsCode

  1. Or right-click inside the file and choose Run Python File in Terminal

vsCode


🎉 Done!

You have successfully set up Python in Visual Studio Code and are ready to start coding!