How to find pg_config path
I recommend that you try to use Postgres.app. (http://postgresapp.com)This way you can easily turn Postgres on and off on your Mac. Once you do, add the path to Postgres to your .profile
file by appending the following:
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
Only after you added Postgres to your path you can try to install psycopg2
either within a virtual environment (using pip) or into your global site packages.
sudo find / -name "pg_config" -print
The answer is /Library/PostgreSQL/9.1/bin/pg_config in my configuration (MAC Maverick)
Postgres.app was updated recently. Now it stores all the binaries in "Versions" folder
PATH="/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH"
Where 9.4 – version of PostgreSQL.