Currently I am installing psycopg2 for work within eclipse with python.
I am finding a lot of problems:
sudo pip3.4 install ps
well, I'd like to give my solution, the problem is related with the version of c. So, I just typed:
CFLAGS='-std=c99' pip install psycopg2==2.6.1
In El Capitan, I used the same solution as @Forbze but 2 more commands as follows.
sudo install_name_tool -change libpq.5.dylib /Library/PostgreSQL/9.3/lib/libpq.5.dylib /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
sudo install_name_tool -change libssl.1.0.0.dylib /Library/PostgreSQL/9.3/lib/libssl.1.0.0.dylib /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
sudo install_name_tool -change libcrypto.1.0.0.dylib /Library/PostgreSQL/9.3/lib/libcrypto.1.0.0.dylib /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
It works perfectly!