Before we show you how to install pip on macOS or OS X, we need to be sure you know what pip is. In a nutshell, pip is a package installer and package-management system for Python written in Python used to install packages from the Python Package Index and other indexes. pip is recommended for installing Python applications and its dependencies during deployment.
This tutorial will show you how to install pip on macOS or OS X. SO to get started you need to launch the terminal by going to “Applications” > “Utilities” > “Terminal“.
Once there run the following command to install Xcode’s command line tools:
$ xcode-select --install
Next, run the following command to install pip:
$ python -m ensurepip --upgrade
You are now ready to use pip to install Python packed. Here is one example:
$ pip install package-name
That’s it! That is how to install pip on your macOS or OS X machine. Also, don’t forget to check out the official pip package page here for more exciting stuff.