Solution for psycopg2 installation error with Mac OSX El Capitan

Posted on Sun 11 October 2015 in Development

The Issue

If you tried to install to install psycopg2 package after upgrading to Mac OSX El Capitan and got an error like this:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), 
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

pip.log

The Soltuion:

Simplly install Command-Line Tools:

sudo xcode-select --install