Python Course #2: Installing Python - Set Up Your Coding Environment

Lesson 2: Installing Python

Set up your coding environment and write your first real program!

Beginner Level | 12 min read

Before We Begin

Installing Python is completely free and takes just a few minutes. By the end of this lesson, you'll have Python running on your computer!

What you'll need:

  • A computer (Windows, Mac, or Linux)
  • Internet connection
  • About 100MB of free space
  • 5-10 minutes of your time

Step 1: Download Python

1Visit the Official Python Website

Go to python.org and click on "Downloads"

The website automatically detects your operating system and suggests the right version.

2Choose Your Version

Download Python 3.11 or later (NOT Python 2.x - it's outdated)

Recommended: Always get the latest stable version

Step 2: Install Python

For Windows Users

  1. Run the downloaded installer file
  2. IMPORTANT: Check the box "Add Python to PATH"
  3. Click "Install Now"
  4. Wait for installation to complete (2-3 minutes)
  5. Click "Close" when finished
Critical Step: Make sure you check "Add Python to PATH" - this is very important!

For Mac Users

  1. Open the downloaded .pkg file
  2. Follow the installation wizard
  3. Click "Continue" through the steps
  4. Enter your password when prompted
  5. Click "Install" and wait
  6. Installation complete!

For Linux Users

Most Linux distributions come with Python pre-installed. Open terminal and type:

python3 --version

If not installed, use your package manager:

sudo apt-get install python3

Step 3: Verify Installation

3Test if Python is Working

Windows: Open Command Prompt (search "cmd")

Mac/Linux: Open Terminal

Type this command:

python --version

You should see something like: Python 3.11.0

Step 4: Run Your First Program

Now let's write code! Open your terminal/command prompt and type:

python

You'll see the Python prompt (>>>). Now type:

>>> print("I just installed Python!")

Output:

I just installed Python!

Interactive Quiz Time!

Question 1: Which version of Python should you install?
A) Python 2.7
B) Python 3.11 or later
C) Python 1.0
D) Any version works
Question 2: What important checkbox must Windows users select during installation?
A) Install for all users
B) Add Python to PATH
C) Create desktop shortcut
D) Install documentation
Question 3: How do you check if Python is installed correctly?
A) Restart your computer
B) Type 'python --version' in terminal
C) Check Control Panel
D) Look for a Python icon

Common Issues & Solutions

Problem: "python is not recognized"

Solution: You forgot to add Python to PATH. Reinstall and check that box!

Problem: Command prompt won't open

Solution: Search for "cmd" or "terminal" in your start menu

Key Takeaways

  • Download Python from python.org
  • Install Python 3.11 or later
  • Add Python to PATH (Windows)
  • Verify with python --version
  • Use python command to start coding

Great Job! Installation Complete!

Next Lesson: Variables and Data Types - Storing Information in Python
Learn how to store and work with data!

Post a Comment

0 Comments