MacOS comes with Python installed. But to make sure that you have Python installed open the terminal and run the following command.

python --version

If this command returns a version number that means Python exists. Which also means that you already have access to easy_install considering you are using macOS/OSX. Now, all you have to do is run the following command.

sudo easy_install pip

After that, pip will be installed and you'll be able to use it for installing other packages. For try if pip working well use:

pip --version

If you want install another modules - you can do this, for example:

pip install regex

Then runing

sudo pip3 install beautifulsoup4