How to Install pip on MacOS or OS X?


There are different ways to install pip on MacOS or OS X:

  1. Install pip using the built-in package manager, Homebrew. Open your terminal and type:
$ /usr/bin/ruby -e "$(curl -fsSL"

Follow the prompts to install Homebrew, then type:

$ brew install python

This installs Python 3 and pip.

  1. If you have Python 2.7.9 or later or Python 3.4 or later, pip should already be installed. To check, open your terminal and type:
$ pip --version

If pip is not installed, install it using:

$ sudo easy_install pip
  1. You can also install pip using the script. Download the script from the official pip website using the following command:
$ curl -o

Then, run the script using the Python interpreter:

$ sudo python

This installs the latest version of pip.

After installation, you can use pip to install various Python packages and libraries.

Latest Questions

python How to Fix ""zsh: command not found: python" Error on MacOS X? python How to Fix "xlrd.biffh.XLRDError: Excel xlsx file; not supported" Error in Pandas? python How to Remove All Whitespace From a Python String?