How do I install pip on macOS or OS X?

installation, macos, pip, python

Solution

On Linux or MacOS:

python -m ensurepip --upgrade

If you want to install `pip` for Python 3, replace `python` with `python3`.

See https://pip.pypa.io/en/stable/installation/ for more details.

Problem

I spent most of the day yesterday searching for a clear answer for installing `pip` (package manager for Python). I can't find a good solution. How do I install it?

Original source

Related problems