✅ Step 1: Download VS Code
-
Go to the official site:
👉 https://code.visualstudio.com -
Click the “Download for Windows”, “macOS”, or “Linux” button (depending on your OS).
-
Save the installer and run it.
✅ Step 2: Install VS Code
-
Run the installer you just downloaded.
-
During installation:
-
✅ Check: “Add to PATH”
-
✅ Check: “Add ‘Open with Code’ to context menu”
-
-
Click Next and then Install.
-
When done, launch VS Code.
✅ Step 3: Install Python Extension in VS Code
-
Open VS Code.
-
Click on the Extensions icon on the left sidebar (or press
Ctrl+Shift+X
). -
In the search bar, type:
👉Python
-
Click the one by Microsoft (has over 80M+ downloads).
-
Click Install.
✅ Step 4: Select Python Interpreter
-
Press
Ctrl+Shift+P
(orCmd+Shift+P
on Mac). -
Type:
👉Python: Select Interpreter
-
Choose the Python version you installed earlier (e.g.,
Python 3.X.X
).
⚠️ If it doesn’t show up, make sure Python is installed and added to PATH. You can also restart VS Code.
✅ Step 5: Write Your First Python File
-
Click File > New File.
-
Save the file as:
hello.py
-
Type this code:
-
Right-click anywhere in the file and choose “Run Python File in Terminal”.
🎉 You should see the output in the terminal at the bottom!
✅ (Optional) Step 6: Install Pylint (For Error Checking)
VS Code may ask: “Do you want to install pylint?”
Click Yes — this helps catch typos and errors while coding.
🚀 That’s it! You’re now ready to start coding Python in VS Code like a pro!