views:

172

answers:

1

This has been driving me crazy for 2 days.

I have been trying to install psycopg2 using easy_install and no matter what I try (i.e using gcc-4.0 instead of the snow leopard default one) I always get the same error:

error: Setup script exited with error: command '/usr/bin/gcc-4.0' failed with exit status 1

Please see: http://dpaste.com/hold/228252/

I have googled that error so many times and nothing I have found seem to help.

+1  A: 

Looks like you're missing a dependency, the development files for libpq. The relevant log part is here:

In file included from psycopg/psycopgmodule.c:32In file included from psycopg/psycopgmodule.c:32: ./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory

Try installing libpq development files and then rerun easy_install. You may hit another missing dependency; pay attention to the first error that GCC spits out.

Gintautas Miliauskas
I added export PATH=/Library/PostgresPlus/8.4SS/bin/:$PATH to ~/.bash_profile, then I rerun easy_install and it worked. Thanks!
Sebastian