💻 Python Installation Guide – Windows, macOS & Linux (2025)
Whether you’re a beginner or setting up your development environment again, this guide will walk you through installing the latest Python (3.13+) on Windows, macOS, and Linux.
🪟 Part 1: Install Python on Windows
✅ Step-by-Step Instructions:
- Download Python
- Visit the official website: https://python.org
- Click on “Download Python 3.13+” (auto-detects Windows)
- Run the Installer
- Double-click the
.exefile after downloading.
- Double-click the
- IMPORTANT: Check the box ✅
✔️ “Add Python to PATH”
This allows you to run Python from the Command Prompt. - Choose Installation Type
- Recommended: Install Now
- For customization (like changing location), choose Customize Installation
- Finish Installation
- Click Close once it’s installed.
- Verify Installation
- Open Command Prompt
- Run:
python --version - Output should be something like:
Python 3.13.0
- Open Python REPL
- Run
pythonin CMD to open the interactive shell.
- Run
🧪 Optional: Install pip packages
pip install numpy pandas flask
✅ pip is included by default with modern Python installations.
🍎 Part 2: Install Python on macOS
✅ Using Homebrew (Recommended)
- Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Python via Homebrew
brew install python
- Verify Python Installation
python3 --version
- Launch Python
python3
🍎 Alternative: Install from python.org
- Go to https://python.org/downloads/mac-osx/
- Download the latest
.pkginstaller for macOS - Run the installer like any other Mac app
- Verify with:
python3 --version
🐧 Part 3: Install Python on Linux (Ubuntu / Debian)
✅ Method 1: Install via apt (System Package Manager)
sudo apt update
sudo apt install python3 python3-pip
✅ Method 2: Build from Source (for latest version)
- Install dependencies:
sudo apt install build-essential zlib1g-dev libncurses5-dev \
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl
- Download latest source code:
curl -O https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz
tar -xvzf Python-3.13.0.tgz
cd Python-3.13.0
- Compile and install:
./configure --enable-optimizations
make -j 4
sudo make altinstall
- Check Version
python3.13 --version
✅ Use make altinstall to avoid overwriting the system’s default python3.
📦 Managing Multiple Python Versions
Use tools like:
- pyenv – Manage multiple Python versions easily (macOS/Linux)
- virtualenv – Isolate environments per project
- venv – Built-in module for environment management
python3 -m venv myenv
source myenv/bin/activate
🧪 Testing Python
Try this simple program to confirm your setup:
print("Hello, Python is installed successfully!")
🧰 Python Tools to Install After Setup
| Tool | Purpose |
|---|---|
| pip | Install packages |
| IDLE | Built-in GUI editor (Windows/macOS) |
| VS Code / PyCharm | Professional IDEs |
| Jupyter Notebook | Data science & ML workflows |
| Git | Version control |
📌 Summary – Python Installation at a Glance
| Platform | Method | Command to Run Python |
|---|---|---|
| Windows | .exe from python.org | python |
| macOS | Homebrew/pkg | python3 |
| Linux | apt/source build | python3 or python3.13 |
❓ FAQs – Python Installation
❓ How do I install Python on Windows?
You can download the latest Python version from python.org. Run the .exe installer and be sure to check “Add Python to PATH” during setup. Then run python --version in Command Prompt to verify.
❓ How do I install Python on macOS?
Use Homebrew with the command brew install python, or download a .pkg installer from python.org. Use python3 to run Python on macOS.
❓ How do I install Python on Linux?
You can use your system’s package manager (e.g., sudo apt install python3) or build it from source for the latest version. Use python3 or python3.13 to launch it.
❓ What’s the difference between python and python3?
On Windows, python usually refers to Python 3. On macOS/Linux, python may point to Python 2.x by default, so you should use python3 to run modern Python code.
❓ Do I need to install pip separately?
No. pip is included with Python installations (3.4+). You can verify by running pip --version.
❓ How do I create a virtual environment in Python?
Use the built-in venv module:
python3 -m venv myenv
source myenv/bin/activate # Linux/macOS
myenv\Scripts\activate # Windows
Share Now :
