How to Install Pip on Mac: A Complete Setup Guide

If you're working with Python on a Mac, pip is one of the first tools you'll need to understand. It's the package installer for Python — the command that lets you pull in libraries like NumPy, Django, Requests, and thousands of others directly from the command line. Without it, setting up any Python-based project becomes significantly more manual.

Here's what you need to know about getting pip running on macOS, including why the process varies more than people expect.

What Is Pip and Why Does It Matter?

Pip stands for "Pip Installs Packages." It's a command-line tool that connects to the Python Package Index (PyPI) — an online repository of over 400,000 open-source Python packages. When you run pip install requests, pip fetches the correct version of that library, resolves its dependencies, and installs everything your project needs.

For web developers specifically, pip is how you install frameworks like Flask or Django, testing tools, API clients, and virtually every third-party Python library you'll encounter.

How macOS Handles Python (And Why It Gets Complicated) 🍎

This is where most confusion begins. Macs ship with a system Python installation managed by Apple, and it's not meant to be modified. Depending on your macOS version:

  • macOS Monterey and earlier included Python 2.7 as a system tool
  • macOS Ventura and later removed the bundled Python entirely
  • Neither version's system Python is intended for general development use

Running python or python3 in Terminal may return a version, but that doesn't mean pip is installed or ready to use — and modifying the system Python installation can cause conflicts with macOS internals.

This is why most developers install a separate Python environment rather than relying on whatever the system provides.

Method 1: Install Python from Python.org (Includes Pip by Default)

The most straightforward path for most users:

  1. Go to python.org/downloads and download the latest stable macOS installer
  2. Run the .pkg file and follow the installation steps
  3. Open Terminal and run:
python3 --version pip3 --version 

If both return version numbers, you're set. Modern Python installers (3.4 and later) bundle pip automatically. You'll use pip3 rather than pip to make sure you're targeting the right Python version.

Method 2: Install Pip via Homebrew

Homebrew is a popular package manager for macOS that many developers already use. If you have Homebrew installed:

brew install python 

This installs a Homebrew-managed Python with pip included. One advantage here is that Homebrew keeps Python updates cleaner and separate from the system. After installation:

pip3 --version 

Homebrew installs Python to its own directory (typically /opt/homebrew/ on Apple Silicon Macs), which avoids conflicts with system paths.

Method 3: Bootstrap Pip with ensurepip or get-pip.py

If Python is already installed but pip is missing, two recovery options exist:

Using ensurepip (built into Python 3.4+):

python3 -m ensurepip --upgrade 

Using the official get-pip.py script:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py 

Both methods install pip into your current Python environment without requiring a full reinstall.

Virtual Environments: The Variable That Changes Everything

Here's where individual setups diverge significantly. Virtual environments (venv) let you create isolated Python environments for each project — and they're considered best practice for exactly that reason.

When you create a virtual environment:

python3 -m venv myenv source myenv/bin/activate 

...pip is included automatically, and any packages you install stay scoped to that project. This prevents version conflicts between projects and keeps your global Python installation clean.

Setup TypePip BehaviorBest For
System PythonNot recommended to modifyNothing — leave it alone
Python.org installpip3 available globallyGeneral use, beginners
Homebrew Pythonpip3 via Homebrew pathDevelopers already using Homebrew
Virtual environmentIsolated pip per projectAny serious development work
pyenvPer-version pip controlManaging multiple Python versions

Common Issues and What Causes Them

pip: command not found — Usually means Python wasn't added to your PATH, or you're referencing pip instead of pip3 for a Python 3 install.

Permission errors — Often a sign that pip is trying to install into a system-level directory. Running with --user flag or switching to a virtual environment typically resolves this.

Multiple Python versions — If you've installed Python through different methods over time (Homebrew, python.org, Xcode tools), your system may have conflicting versions. Running which python3 and which pip3 helps identify which installations are actually active.

Apple Silicon Macs (M1/M2/M3) 🖥️ — Some older packages have compatibility issues with ARM architecture. This is less common now, but worth knowing if you hit unexpected errors with specific libraries.

The Variable That Only You Can Assess

The right pip setup on a Mac genuinely depends on factors specific to your situation: whether you're managing one project or several, whether you're already using Homebrew, which macOS version you're running, and how much Python version control you need over time.

A developer juggling multiple projects with different dependency requirements will need a different approach than someone installing Python for the first time to run a single script. The methods above all work — but which one fits cleanly into your existing workflow is something only your own setup can answer.