Python Lesson 2: Install Python
Before writing code, install Python on your computer. This takes 5 minutes and you do it only once.
Step 1: Download Python
Go to python.org and click the big “Download Python 3.x” button. It detects your OS automatically.
Step 2: Install on Windows
- Open the downloaded file
- CHECK “Add Python to PATH” — this is critical!
- Click “Install Now” and wait 2-3 minutes
Step 3: Install on Mac
- Open the downloaded .pkg file
- Follow the installer steps — Python installs automatically
Step 4: Verify Installation
# Open Terminal (Mac) or Command Prompt (Windows)
python --version
# Should show: Python 3.12.x
# On Mac, try:
python3 --version
If you see a version number — Python is installed!
Step 5: Install VS Code
VS Code is the best free code editor for Python beginners.
- Go to code.visualstudio.com
- Download and install
- Open VS Code → Extensions → Search “Python” → Install Microsoft Python extension
# Test it: create a file called hello.py
# Type this:
print("Python is working!")
# Press F5 or right-click → Run Python File
🏋️ Practice Task
Install Python 3 and VS Code. Create a file called first.py. Write one print() statement with your name. Run it and verify you see your name on screen.
💡 Hint: On Mac, run “python3 first.py” in Terminal. On Windows, run “python first.py” in Command Prompt.