Installing Python on macOS
This guide will walk you through installing Python on your Mac.
1. Check if Python is Already Installed
Most Macs already have Python pre-installed, but it may be an older version.
Open Terminal (Applications → Utilities → Terminal) and type:
python3 --version
- If you see
Python 3.x.x, Python is already installed. - If it’s very old (below 3.10) or missing, follow the steps below.
2. Download Python
- Visit python.org/downloads.
- The website will suggest the best version for macOS.
- Click Download Python 3.x.x (latest stable release).
3. Install Python
- Open the downloaded
.pkgfile. - Follow the installer steps (click Continue until done).
- This will install both Python 3 and IDLE (a simple code editor).
4. Verify Installation
After installation, open Terminal again and type:
python3 --version
You should see the version number of the newly installed Python ✅
5. Install pip (Package Manager)
pip is used to install extra Python packages.
In Terminal, type:
python3 -m ensurepip --upgrade
Check pip version:
pip3 --version
6. (Optional) Install Homebrew for Easy Updates
Homebrew is a macOS package manager. It makes updating Python easier.
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install Python via Homebrew:
brew install python
✅ Summary
- Check if Python is already installed (
python3 --version). - Download the latest version from python.org.
- Install and verify with Terminal.
- Use pip to install extra libraries.
- (Optional) Use Homebrew to keep Python updated.
Your Mac is now ready for Python programming 🎉