There are two recommended ways to install Python on macOS:
✅ Using the official installer (best for beginners)
✅ Using Homebrew (best for developers)
✅ Method 1: Install Python from Official Website (Beginner Friendly)
Step 1: Check If Python Is Already Installed
Open Terminal (Press Command + Space → type Terminal → press Enter)
Run:
python3 --versionIf you see something like:
Python 3.x.xPython is already installed.
If not, continue below.
Step 2: Download Python
Go to the official website:
👉 https://www.python.org/downloads/mac-osx/
Download the latest stable version for macOS.
You’ll get a .pkg file.
Step 3: Install Python
Double-click the downloaded
.pkgfileClick Continue
Click Install
Enter your Mac password
Wait for installation to finish
That’s it.
Step 4: Verify Installation
Open Terminal again and run:
python3 --versionYou should now see the installed version.
Step 5: Check pip (Python Package Manager)
pip3 --versionIf pip is installed, you're ready to install libraries like:
pip3 install fastapi🚀 Method 2: Install Python Using Homebrew (Recommended for Developers)
If you're a developer (especially backend or full stack), this is cleaner and more powerful.
Step 1: Install Homebrew (If Not Installed)
In Terminal, run:
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"After installation, run:
brew --versionStep 2: Install Python Using Brew
brew install pythonStep 3: Verify Installation
python3 --version⚠️ Important Notes for Mac Users
macOS already has a system Python — do not modify or remove it
Always use
python3instead ofpythonAlways use
pip3instead ofpip