Before you can build anything with Python, you need to make sure it’s installed on your computer. The good news? Many systems already have Python installed — and if not, installing it only takes a few minutes.
In this guide, you’ll learn:
- How to check if Python is already installed
- How to install Python on Windows, macOS, and Linux
- How to confirm everything is working correctly
No prior experience required.
Step 1: Check If Python Is Already Installed
Before installing anything, open a terminal or command line and check whether Python is already available.
Open the Command Line
Windows
- Press Windows + R
- Type
cmd - Press Enter
macOS
- Press Command + Space
- Type Terminal
- Press Enter
Linux
- Open your terminal (usually Ctrl + Alt + T)
Check the Python Version
Run the following command:
python --version
If that doesn’t work, try:
python3 --version
Interpret the Result
- ✅ You see a version number (for example:
Python 3.12.1)- Python is already installed — you can skip to the verification step
- ❌ Command not found / not recognized
- Python is not installed or not available in your system PATH
If Python isn’t installed, continue below for your operating system.
Step 2: Install Python
Installing Python on Windows
1. Download Python
- Go to https://www.python.org
- Click Downloads
- Click Download Python 3.x.x (latest version)
2. Run the Installer
- Open the downloaded installer
- Important: Check the box
✅ “Add Python to PATH” - Click Install Now
⚠️ Forgetting to add Python to PATH is the most common Windows mistake.
3. Verify the Installation
Open Command Prompt again and run:
python --version
You should now see the installed Python version.
Installing Python on macOS
macOS often includes an older system version of Python, so installing the latest version is recommended.
Option A: Official Python Installer (Recommended for Beginners)
- Go to https://www.python.org
- Click Downloads
- Download the macOS installer
- Open the
.pkgfile - Follow the installer steps using default settings
Verify Installation
Open Terminal and run:
python3 --version
Option B: Install Using Homebrew (Advanced Users)
If you use Homebrew:
brew install python
Then verify:
python3 --version
Installing Python on Linux
Most Linux distributions already include Python, but you may need to install or update it.
Ubuntu / Debian
sudo apt update
sudo apt install python3 python3-pip
Verify:
python3 --version
Fedora
sudo dnf install python3 python3-pip
Verify:
python3 --version
Arch Linux
sudo pacman -S python python-pip
Verify:
python --version
Step 3: Confirm Python Is Working
Run Python in interactive mode:
python
or on macOS/Linux:
python3
You should see something like:
Python 3.12.1 (main, ...)
>>>
Exit Python by typing:
exit()
Common Issues and Fixes
“python is not recognized” (Windows)
- Reinstall Python and ensure Add Python to PATH is checked
python doesn’t work but python3 does
- This is normal on macOS and Linux — use
python3
Multiple Python Versions Installed
Check which version is being used:
which python
which python3
Next Steps
Now that Python is installed, you’re ready to:
- Write your first Python script
- Install packages using
pip - Create virtual environments
- Build real projects














One response to “How to Install Python on Windows, macOS, and Linux (Step-by-Step Guide)”
[…] If you have not installed Python on your computer yet, or if you are unsure of whether you have it already, please refer to our article on getting Python up and running. […]