Python Installation & Setup Guide: Windows, macOS & Linux

Setting up your Python development environment properly is the foundational step in your programming journey. In this detailed guide, you will learn how to download, install, and verify modern Python 3 on Windows 11/10, macOS, and Linux (Ubuntu/Debian), along with configuring the IDLE development environment.

Python Official Website Download Page

Figure 3.1: Python official download page on python.org automatically detecting your operating system.


Step 1: Installing Python on Windows (11 / 10)

Follow these exact steps to ensure a flawless installation on your Windows PC:

• Step 1.1: Download Installer: Navigate to python.org/downloads and click the prominent yellow button labeled "Download Python 3.x.x".

• Step 1.2: Launch Installer: Double-click the downloaded executable file (e.g. python-3.12.x-amd64.exe).

• Step 1.3: THE CRITICAL STEP (Add to PATH): On the bottom of the installation window, you will see a checkbox: [x] Add python.exe to PATH. You MUST check this box! If left unchecked, your command prompt will show the error 'python' is not recognized as an internal or external command.

• Step 1.4: Install Now: Click "Install Now". Windows will request Administrator permission; click Yes. Once completed, click "Disable path length limit" if prompted, then click Close.

Python Setup Wizard Add to PATH Checkbox

Figure 3.2: Crucial step: Ensure 'Add python.exe to PATH' is checked before clicking Install Now.


Step 2: Installing Python on macOS

While macOS previously included an obsolete version of Python 2.7, modern Python development requires Python 3:

• Option A (Official PKG): Download the macOS 64-bit universal installer from python.org, open the .pkg file, and follow the standard installation wizard.

• Option B (Homebrew Terminal): If you use Homebrew package manager, open Terminal and simply run:

# Install Python 3 on macOS via Homebrew
brew update
brew install python

Step 3: Installing Python on Linux (Ubuntu / Debian / Fedora)

Almost all modern Linux distributions come with Python 3 pre-installed. You can update or install it via your native package manager:

# For Ubuntu / Debian / Linux Mint:
sudo apt update
sudo apt install python3 python3-pip python3-idle -y

# For Fedora / Red Hat / CentOS:
sudo dnf install python3 python3-pip

Step 4: Verifying Your Python Installation

To confirm that Python and the pip package manager are correctly installed and accessible system-wide, open your Command Prompt (CMD), PowerShell, or Linux Terminal, and execute:

python --version
pip --version

Expected Terminal Output:

Python 3.12.2
pip 24.0 from C:...site-packagespip (python 3.12)

Note for Mac and Linux users: If typing python outputs Python 2 or command not found, use python3 --version and pip3 --version.


What is IDLE? (Integrated Development and Learning Environment)

When you install Python on Windows or Mac, it bundles an official lightweight IDE called IDLE. IDLE features syntax highlighting, smart code indentation, and an interactive shell. To launch it, search for "IDLE" in your Windows Start Menu or Mac Spotlight search.

Python IDLE Interactive Shell Window

Figure 3.3: Python IDLE interactive shell executing code in real time.


Hands-on Practice: Verify in Interactive Mode

Open your terminal or IDLE shell and type the following commands:

>>> 25 * 4
100
>>> site = "Veewom.com"
>>> f"Learning Python on {site}"
'Learning Python on Veewom.com'
>>> exit()

Frequently Asked Questions (FAQ)

What should I do if I forgot to check 'Add to PATH'?

You don't need to panic! Simply re-run the Python installer executable, choose "Modify", click Next, and check "Add Python to environment variables", or follow our next lesson on manually configuring the Python PATH.

Which code editor should I use after IDLE?

While IDLE is great for quick tests, professional developers and BCA college students prefer Visual Studio Code (VS Code) with the official Microsoft Python extension, or JetBrains PyCharm Community Edition.
Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!