I figured out what the underlying problem is with many of the current osx installations ( such as http://psycopg.lighthouseapp.com/projects/62710/tickets/111-library-not-loaded-libssl100dylib and python pip install psycopg2 install error )
A lot of people use the PostgreSQL installer from EnterpriseDB ; probably because it's the first option in http://www.postgresql.org/download/macosx/
If you install with that, it installs all the needed binaries and libraries into it's private versioned space...
ie
/Library/PostgreSQL/9.2/bin
/Library/PostgreSQL/9.2/lib
/Library/PostgreSQL/8.4.5/bin
/Library/PostgreSQL/8.4.5/lib
If I run pg_config ( which points to the /Library/PostgreSQL/v/bin/pg_config ) it shoes the right info
LIBDIR = /Library/PostgreSQL/9.2/lib
However, all the errors from importing psycopg2 seem to show that psycopg2 is trying to load out of /usr/local/lib and not the lib that it was compiled against ( or should be expecting )
I tried using environment vars ( LD_LIBRARY_PATH , LD_PRELOAD ) but can't seem to make this work. Unless the (correct) files are /usr/local/lib , psycopg2 doesn't want to import.
I don't like the solution that others have mentioned here to rewrite or link these files; there's got to be a way to force Python / psycopg2 to use the intended filepaths.