✅ STEP 1: INSTALL PYTHON ON WINDOWS
Go to the official Python website:
👉 https://www.python.org/downloads/
- Click on "Download Python X.X.X" (latest stable version).
- Run the installer and check ✅ "Add Python to PATH".
- Click "Install Now".
- Once done, close the installer.
- Open the terminal (CMD or PowerShell) and type:
python --version
or
py --version
🧰 STEP 2: INSTALL VISUAL STUDIO CODE
Go to the official website: 👉 https://code.visualstudio.com/
- Download the Windows version
- During installation, check:
- ✅ Add to PATH
- ✅ Register as default editor
- ✅ Add "Open with Code" to context menu
🔌 STEP 3: INSTALL THE PYTHON EXTENSION IN VS CODE
- Open VS Code
- Click the Extensions icon (left sidebar)
- Search for 👉 Python
- Install the official Microsoft extension
- Enable: autocomplete, code execution, and virtual environments
🧪 STEP 4: CREATE YOUR FIRST PYTHON SCRIPT
- Open or create a folder in VS Code
- Create a file named
hello.py
- Write:
print("Hello from VS Code with Python!")
Save the file with Ctrl + S
▶️ STEP 5: RUN THE CODE
You have several options to run your code.
OPTION 1: INTEGRATED TERMINAL
- Go to: Terminal > New Terminal
- Run:
python hello.py
OPTION 2: "▶ Run" BUTTON
- Click the "Run Python file" button
- You’ll see the output in the bottom console
⚙️ STEP 6 (OPTIONAL): CONFIGURE PYTHON ENVIRONMENT
- Press Ctrl + Shift + P
- Type: Python: Select Interpreter
- Select your desired Python version for the project
📦 STEP 7 (OPTIONAL): INSTALL PACKAGES
Use pip from the terminal:
pip install numpy pandas requests
Or create a virtual environment:
python -m venv venv
.\venv\Scripts\activate
pip install flask