Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
Module 1 - Python Fundamentals Python Python Basics Python Programming: From Zero to Real-World Applications setup

Installing Python on Any Operating System

Reviewed & accurate
AI Summary

What You Will Learn

Beginner

  • How to install Python on Windows, macOS, and Linux
  • How to verify the installation
  • How to use pip (Python package manager)

Install on Windows

Go to python.org/downloads
Download the Windows installer (Python 3.12+)
Run the installer
Check 'Add Python to PATH' (IMPORTANT!)
Click 'Install Now'
Verify: open Command Prompt, run python --version

Install on macOS

Option 1: Download from python.org/downloads
Option 2: Use Homebrew: brew install python
Verify: open Terminal, run python3 --version
Check pip: pip3 --version

Install on Linux (Ubuntu/Debian)

Terminalbash
sudo apt update
sudo apt install python3 python3-pip
python3 --version
pip3 --version
python vs python3
On macOS and Linux, the command might be python3 instead of python. Use python3 if python does not work.

Verifying the Installation

Terminalbash
$ python --version
Python 3.12.2

$ pip --version
pip 24.0

Practical Exercise

Download and install Python 3.12+
Verify: python --version (or python3 --version)
Verify pip: pip --version
Run: python -c "print('Installation successful!')"

Key Takeaways

  • Download from python.org for Windows/macOS.
  • Linux: sudo apt install python3 python3-pip.
  • ALWAYS check 'Add Python to PATH' on Windows.
  • Verify with: python --version
  • pip is the package manager - comes with Python.
Previously: Lesson 01 introduced Python.
Today: You learned: Install Python on any OS in 5 minutes.
Next: Lesson 03 runs your first program.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments