> ## Documentation Index
> Fetch the complete documentation index at: https://fastapi2day.codewithsiva.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing Python on Your Computer: Complete Guide

> A platform-aware guide to installing Python on Windows, macOS, or Linux, with verification steps to confirm your installation is working correctly.

Installing Python is the first concrete step toward building with it. The process differs slightly depending on your operating system, but the end result is the same: a `python3` (or `python`) executable on your PATH, a package manager called `pip`, and a working interactive interpreter you can launch from your terminal. This page gives you an overview of each platform and the verification commands you will run after installing. If you want the full step-by-step walkthrough, jump to your platform guide directly from the cards below.

## Choose your operating system

<CardGroup cols={3}>
  <Card title="Windows" icon="windows" href="/getting-started/installing-python-windows">
    Windows 10 or 11 — installer from python.org with PATH setup instructions.
  </Card>

  <Card title="macOS" icon="apple" href="/getting-started/installing-python-macos">
    Mac computers — official `.pkg` installer or Homebrew.
  </Card>

  <Card title="Linux" icon="linux" href="/getting-started/installing-python-linux">
    Ubuntu, Debian, Fedora, Arch, and more — via your system package manager.
  </Card>
</CardGroup>

## Quick installation overview

<Tabs>
  <Tab title="Windows">
    1. Download the latest Python installer from [python.org/downloads](https://www.python.org/downloads/).
    2. Run the installer — **check "Add python.exe to PATH"** before clicking Install Now.
    3. Open Windows Terminal and verify:

    ```bash theme={null}
    python --version
    ```

    <Warning>
      If you skip the "Add to PATH" checkbox, the `python` command won't be recognised in any terminal. See the [Windows guide](/getting-started/installing-python-windows) for the fix.
    </Warning>
  </Tab>

  <Tab title="macOS">
    1. Download the latest `.pkg` installer from [python.org/downloads](https://www.python.org/downloads/).
    2. Open and run the installer, accepting the licence agreement.
    3. Open a **new** Terminal window and verify:

    ```bash theme={null}
    python3 --version
    ```

    Alternatively, install via Homebrew:

    ```bash theme={null}
    brew install python@3
    ```

    <Note>
      macOS ships with a system Python that you should leave untouched. Always use `python3` to call the version you installed.
    </Note>
  </Tab>

  <Tab title="Linux">
    Most Linux distributions include Python 3 by default. Check first:

    ```bash theme={null}
    python3 --version
    ```

    If it's missing or outdated, install it via your package manager:

    ```bash theme={null}
    # Ubuntu / Debian
    sudo apt update && sudo apt install python3 python3-pip python3-venv

    # Fedora / RHEL
    sudo dnf install python3 python3-pip

    # Arch / Manjaro
    sudo pacman -S python python-pip
    ```
  </Tab>
</Tabs>

## Verifying your installation

Once you have installed Python, open a terminal and run the appropriate command for your platform:

<CodeGroup>
  ```bash Windows theme={null}
  python --version
  ```

  ```bash macOS / Linux theme={null}
  python3 --version
  ```
</CodeGroup>

You should see output like:

```text theme={null}
Python 3.13.5
```

<Tip>
  If `python3` is not found on Windows, try `python` — they often refer to the same installation. On macOS and Linux, always prefer `python3` to avoid accidentally invoking a legacy Python 2 binary.
</Tip>

Also confirm that `pip` (the Python package manager) is available — you will need it throughout this course:

<CodeGroup>
  ```bash Windows theme={null}
  pip --version
  ```

  ```bash macOS / Linux theme={null}
  pip3 --version
  ```
</CodeGroup>

Expected output (version numbers will vary):

```text theme={null}
pip 24.0 from /usr/local/lib/python3.13/site-packages/pip (python 3.13)
```

## Test the interactive interpreter

Python ships with an interactive interpreter called the **REPL** (Read-Eval-Print Loop). You can use it to run Python expressions one line at a time — great for quick experiments:

<CodeGroup>
  ```bash Windows theme={null}
  python
  ```

  ```bash macOS / Linux theme={null}
  python3
  ```
</CodeGroup>

You will see the `>>>` prompt, which means Python is ready:

```text theme={null}
Python 3.13.5 (main, Jul 29 2025) on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
```

Try a quick command:

```python theme={null}
print("Python is installed and working!")
```

To exit the interpreter, type `exit()` or press `Ctrl + D` (macOS/Linux) / `Ctrl + Z` then Enter (Windows).

<Note>
  If anything doesn't work as expected, head to the detailed guide for your platform — each one includes a thorough troubleshooting section.
</Note>

## Platform-specific guides

<CardGroup cols={3}>
  <Card title="Windows — Full Guide" icon="windows" href="/getting-started/installing-python-windows">
    Covers PATH setup, the Microsoft Store conflict, and multiple Python versions.
  </Card>

  <Card title="macOS — Full Guide" icon="apple" href="/getting-started/installing-python-macos">
    Covers Homebrew vs. direct download, certificate errors, and shell configuration.
  </Card>

  <Card title="Linux — Full Guide" icon="linux" href="/getting-started/installing-python-linux">
    Covers apt, dnf, pacman, the deadsnakes PPA, and virtual environment best practices.
  </Card>
</CardGroup>
