pip is a package management system used to install and manage softeare packages written in Python.
when you install pip on an old OSX, you can follow the example from offcial website :
But sometimes there will be something wrong here on lastest OSX, and this is because of the new SIP protection mechanism on lastest OSX.
Just use this way:
pip install --user