Install Python and Visual Studio Code (PC - Windows) — Interactive Checklist Form
Objective
This guide explains, step by step, how to install:
- Python
- Visual Studio Code (VS Code)
- The Python extension for VS Code
- A simple test program to confirm everything is working
Review Information
Before You Start
You need:
- A Windows PC
- Internet access
- Permission to install software
It is best to close other programs before starting.
Step 1 — Download Python
Open your web browser.
Click the button to download the latest Python version for Windows.
Wait until the installer file finishes downloading.
Step 2 — Install Python
Open your Downloads folder.
Double-click the Python installer file.
On the first installation screen, very important, check:
After checking the box, click:
- Install Now
Wait for the installation to finish.
If Windows asks for permission, click Yes.
When the installation is complete, click Close.
Step 3 — Verify Python Installation
Open Command Prompt.
- Click Start
- Type
cmd - Press Enter
In Command Prompt, type:
python --version- Press Enter.
You should see something similar to:
Python 3.x.x- Also test
pipby typing:
pip --versionYou should see a version number.
Step 4 — If python Does Not Work
If you get a message saying Python is not recognized:
Close Command Prompt.
Run the Python installer again.
Make sure you check:
Complete the installation again.
Open a new Command Prompt window and test again.
Step 5 — Download Visual Studio Code
Open your web browser.
Click Download for Windows.
Wait for the installer to download.
Step 6 — Install Visual Studio Code
Open the downloaded VS Code installer.
Click Next through the setup screens.
Accept the license agreement.
Continue clicking Next until you reach Select Additional Tasks.
It is recommended to check:
Click Next.
Click Install.
After installation, click Finish.
Step 7 — Open VS Code
Open Visual Studio Code.
Wait for the main screen to appear.
On the left side, locate the Extensions icon.
Step 8 — Install the Python Extension
Click the Extensions icon.
In the search box, type:
Python
Find Python by Microsoft.
Click Install.
Wait for the extension to finish installing.
Step 9 — Open a Working Folder
In VS Code, click File > Open Folder.
Create or choose a folder for Python work.
Example:
C:\Users\YourName\Documents\Python-Projects
- Click Select Folder.
Step 10 — Create a Test Python File
In VS Code, click File > New File.
Save the file as:
test.py
- Type the following code into the file:
print("Hello Yahya - Python is working on PC!")- Save the file.
Step 11 — Select the Python Interpreter
- Press:
Ctrl + Shift + P
- In the command box, type:
Python: Select Interpreter
Click it.
Choose the installed Python version.
It may look similar to:
Python 3.x.x 64-bit
Step 12 — Run the Test Program
You can run the file in either of these ways.
Option B — Run from Terminal
In VS Code, click Terminal > New Terminal.
Type:
python test.py- Press Enter.
Expected result:
Hello Yahya - Python is working on PC!
Step 13 — Install Common Python Packages
In the VS Code terminal, type:
pip install pandas matplotlib numpy openpyxlPress Enter and wait for installation to complete.
Step 14 — Check Installed Packages
To confirm installation, type:
pip listLook for packages such as:
- pandas
- matplotlib
- numpy
- openpyxl
Step 15 — Create a Better Folder Structure
You may want a simple structure like this:
Python-Projects/
01-Test/
02-Scripts/
03-Data/
04-Results/
This helps keep your work organized.
Step 16 — Recommended Settings for Windows
Useful tips:
- Restart VS Code after installing extensions.
- Restart Command Prompt after installing Python.
- Save files with
.pyextension. - Use simple folder names without special characters when starting.
Troubleshooting
Problem 1 — python not recognized
Possible reason:
- Python was not added to PATH.
Fix:
- Reinstall Python and check Add Python to PATH.
Problem 2 — VS Code cannot find Python interpreter
Fix:
- Press
Ctrl + Shift + P - Run
Python: Select Interpreter - Select the correct Python version
Problem 3 — pip not recognized
Fix:
- Reinstall Python
- Make sure Python and pip were installed correctly
- Open a new Command Prompt window
Problem 4 — Script runs and closes too quickly
If using Command Prompt directly, add:
input("Press Enter to close...")at the end of your test script.
Summary
You have now completed the following:
- Installed Python on Windows
- Installed Visual Studio Code
- Installed the Python extension
- Selected the Python interpreter
- Created and ran a test Python file
- Installed common Python packages
Next Suggested Step
Your next test file can be:
name = input("What is your name? ")
print("Hello", name)Save it as:
hello.py
Then run it in VS Code.