Pip Installation for Macs

New to Python and need to install Pandas, Numpy, or one of the other super useful Python libraries? Then you’ve probably been directed towards pip which can be a bit daunting at first for people new to command line interfaces.

system:
macOS
Python 2.7

Let’s first make sure that you have Python installed.  Type the following into your terminal.

python --version

On my machine I get back, “Python 2.7.10” . This means that we have python installed on our machine and we can continue on to our next step. If you get the “python: command not found” error then go over to Python’s official website and get that setup first.

Pip installation command

Assuming you have Python installed on your machine, and Macs will come from the store with a Python installation, then we can go ahead and run the next line to get pip going.

sudo easy_install pip

This line is specific to macs. After hitting enter we’ll have a bunch of info returned which you can ignore for the time being. Pip is now installed and you can get to adding the libraries you need using the following for example.

pip install pandas

Cheers!

Leave a Comment