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.

Leave a Comment