Previous: Introduction Next: Python Syntax

Python Installation Guide

Getting Started with Python 3

Step 1: Download the Installer

The first step for any operating system is to visit the official Python website. They provide installers that handle most of the configuration automatically.

  • Navigate to: https://www.python.org/downloads/
  • Click the large button that says "Download Python 3.X.X" for your specific OS (Windows, macOS).

Installing on Windows

  1. Run the Executable: Double-click the downloaded .exe installer file.
  2. Check the PATH Box (Crucial!): At the very first screen of the installer, look for the checkbox at the bottom that says "Add python.exe to PATH" and make sure it is checked. This saves you a lot of manual setup later.
  3. Choose Installation: Select "Install Now" for the default setup, which includes IDLE (a basic editor), pip, and documentation.
  4. Finish: Click "Close" when the setup is complete.

Installing on macOS

  1. Run the Package: Double-click the downloaded .pkg file to start the installer.
  2. Follow Prompts: Proceed through the installer screens (Introduction, License, Destination Select, Installation Type).
  3. Enter Password: You may need to enter your administrative password to allow the installation.
  4. Check Documentation: The installer will place the Python 3 framework and supporting files in the appropriate locations.

Installing on Linux (Package Manager)

Most Linux distributions come with Python pre-installed, but you might need a newer version or the developer libraries. Use your distribution's package manager:

For Debian/Ubuntu:

sudo apt update && sudo apt install python3

For Fedora/CentOS:

sudo dnf install python3

Step 2: Verify the Installation

Open your command line (Terminal, Command Prompt, or PowerShell) and run the following command to ensure Python is ready to use:

python --version

You should see the version number displayed (e.g., Python 3.14.0). If that doesn't work, try python3 --version.