PDF download Download Article
Simple tips to get the Python package manager up and running
PDF download Download Article

If you want to install packages from the Python Package Index on your Mac, you'll need Pip. Fortunately, if you installed Python 3.4, you should already have Pip—just run the command python3 -m pip --version to check. If you don't have Pip, there are a few different ways to install it. This wikiHow article will walk you through three simple ways to install Pip on a Mac desktop computer or MacBook.

Things You Should Know

  • If you installed Python 3.4 or later, you should have Pip. If the pip command is not working, use pip3 instead.
  • If Pip isn't installed, you can install it using the command python3 -m ensurepip --default-pip .
  • If you didn't use Homebrew or another package manger to install Python, you can install Pip with the Get-Pip Python script.
Section 1 of 3:

Installing with Ensurepip

PDF download Download Article
  1. If you haven't done so, you can open a Terminal from the Launchpad. The Ensurepip Python module is the most straightforward way to install Pip on both macOS and Linux.
  2. If you installed Python 3.9 or later from Python.org, by using Homebrew, or by installing the Xcode command line tools, you should already have Pip. To check, type python3 -m pip --version into your terminal and press Return . [1]
    • If pip3 is not found, continue with this method to install it.
    • If needed, you can update Pip to the latest version using the command python -m pip install --upgrade pip . [2]
    Advertisement
  3. If Pip was not installed, this command will install it to your current Python 3 installation. If Pip was installed, you'll see a message that says "Requirement already satisfied."
    • If you only want to install Pip for the current user (not machine-wide), use the command python3 -m ensurepip --upgrade --user instead.
  4. Advertisement
Section 2 of 3:

Installing with Homebrew

PDF download Download Article
  1. If you installed Python 3.4 or later using Homebrew, you will already have Pip installed. If you don't have Python 3.4, you can install it easily with Homebrew, which will give you the latest version of Pip.
    • If you want to upgrade the version of Pip you installed with Homebrew, use the command python3 -m pip install --upgrade pip . [3]
    • To see which version of Pip is installed, use the command python3 -m pip --version .
  2. If you haven’t already installed Homebrew, type /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" and press Return . [4]
  3. Installing Python also installs Pip. To install, type brew install python3 and press Return .
  4. Advertisement
Section 3 of 3:

Installing with Get-Pip

PDF download Download Article
  1. If you installed Python from source code but don't have Pip, you can use a simple script to install it.
    • Don't use this method if you installed Python through Homebrew or another package manager, as the script will not interact with those tools. [5]
    • You can check your current Pip version using the command python3 -m pip --version . Or, if you just want to update Pip, use the command python3 -m pip install --upgrade pip .
  2. You can use the curl command to do this. Just type curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py and press Return to save the script to the current directory. [6]
  3. This runs the downloaded script, which will then install Pip, SetupTools, and Wheel for your current Python 3 environment.
  4. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read 7,850 times.

      Is this article up to date?

      Advertisement