In my MacOS Mojave terminal I wanted to install a python package with pip. At the end it says:
You are using pip version 10.0.1, however version 18.1 is avai
For MacOs & Unix
Just by adding sudo to command will work, as it would run it as a superuser.
sudo pip install --upgrade pip
It is advised that you should not directly do it though - please see this post