How to Install Python on Your PC (Windows, macOS, Linux) – Step-by-Step Guide

How to Install Python on Your PC (Windows, macOS, Linux) – Step-by-Step Guide

Introduction

Python is one of the most popular programming languages used for web development, data science, automation, and AI. Whether you're a beginner or an experienced developer, installing Python on your PC is the first step in your coding journey. This guide will help you install Python on Windows, macOS, and Linux with easy-to-follow steps.

Step 1: Download Python

To install Python, first download the latest version from the official website: Download Python

Step 2: Install Python on Windows

1. Run the Installer

  • Open the downloaded python-xx.x.x.exe file.

  • Check the box that says "Add Python to PATH" before clicking Install Now.

  • Wait for the installation to complete.

2. Verify Installation

After installation, open Command Prompt (cmd) and type:

python --version

If Python is installed successfully, you will see the installed version.

Step 3: Install Python on macOS

1. Use Homebrew (Recommended)

If you have Homebrew installed, run:

brew install python

Alternatively, you can download the .pkg file from the official Python website and install it manually.

2. Verify Installation

Open Terminal and type:

python3 --version

Step 4: Install Python on Linux

1. Install via APT (Debian/Ubuntu)

sudo apt update
sudo apt install python3

2. Install via DNF (Fedora)

sudo dnf install python3

3. Install via Pacman (Arch Linux)

sudo pacman -S python

4. Verify Installation

python3 --version

Conclusion

Python is now installed on your PC! You can start coding by opening a terminal and typing python to enter the interactive shell. If you need additional packages, install them using pip, Python's package manager.

Happy coding! 🚀