can't install psycopg2 in my env on mac os x lion

Posted by Alexander Ovchinnikov on Server Fault See other posts from Server Fault or by Alexander Ovchinnikov
Published on 2011-11-15T09:36:50Z Indexed on 2011/11/15 9:55 UTC
Read the original article Hit count: 1234

Filed under:
|
|
|
|

I tried install psycopg2 via pip in my virtual env, but got this error:

ld: library not found for -lpq

(full log here: http://pastebin.com/XdmGyJ4u )

I tried install postgres 9.1 from .dmg and via port,

(gksks)iMac-Alexander:~ lorddaedra$ locate libpq
/Developer/SDKs/MacOSX10.7.sdk/usr/include/libpq
/Developer/SDKs/MacOSX10.7.sdk/usr/include/libpq/libpq-fs.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/libpq-events.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/libpq-fe.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/internal/libpq
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/internal/libpq/pqcomm.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/internal/libpq-int.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/auth.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/be-fsstubs.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/crypt.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/hba.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/ip.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/libpq-be.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/libpq-fs.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/libpq.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/md5.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/pqcomm.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/pqformat.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/postgresql/server/libpq/pqsignal.h
/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libpq.5.3.dylib
/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libpq.5.dylib
/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libpq.a
/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libpq.dylib
/Library/PostgreSQL/9.1/doc/postgresql/html/install-windows-libpq.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-async.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-build.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-cancel.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-connect.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-control.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-copy.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-envars.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-events.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-example.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-exec.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-fastpath.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-ldap.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-misc.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-notice-processing.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-notify.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-pgpass.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-pgservice.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-ssl.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-status.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq-threading.html
/Library/PostgreSQL/9.1/doc/postgresql/html/libpq.html
/Library/PostgreSQL/9.1/include/libpq
/Library/PostgreSQL/9.1/include/libpq/libpq-fs.h
/Library/PostgreSQL/9.1/include/libpq-events.h
/Library/PostgreSQL/9.1/include/libpq-fe.h
/Library/PostgreSQL/9.1/include/postgresql/internal/libpq
/Library/PostgreSQL/9.1/include/postgresql/internal/libpq/pqcomm.h
/Library/PostgreSQL/9.1/include/postgresql/internal/libpq-int.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/auth.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/be-fsstubs.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/crypt.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/hba.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/ip.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/libpq-be.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/libpq-fs.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/libpq.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/md5.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/pqcomm.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/pqformat.h
/Library/PostgreSQL/9.1/include/postgresql/server/libpq/pqsignal.h
/Library/PostgreSQL/9.1/lib/libpq.5.4.dylib
/Library/PostgreSQL/9.1/lib/libpq.5.dylib
/Library/PostgreSQL/9.1/lib/libpq.a
/Library/PostgreSQL/9.1/lib/libpq.dylib
/Library/PostgreSQL/9.1/lib/postgresql/libpqwalreceiver.so
/Library/PostgreSQL/9.1/pgAdmin3.app/Contents/Frameworks/libpq.5.dylib
/Library/PostgreSQL/psqlODBC/lib/libpq.5.4.dylib
/Library/PostgreSQL/psqlODBC/lib/libpq.5.dylib
/Library/PostgreSQL/psqlODBC/lib/libpq.dylib
/Library/WebServer/Documents/postgresql/html/install-windows-libpq.html
/Library/WebServer/Documents/postgresql/html/libpq-async.html
/Library/WebServer/Documents/postgresql/html/libpq-build.html
/Library/WebServer/Documents/postgresql/html/libpq-cancel.html
/Library/WebServer/Documents/postgresql/html/libpq-connect.html
/Library/WebServer/Documents/postgresql/html/libpq-control.html
/Library/WebServer/Documents/postgresql/html/libpq-copy.html
/Library/WebServer/Documents/postgresql/html/libpq-envars.html
/Library/WebServer/Documents/postgresql/html/libpq-events.html
/Library/WebServer/Documents/postgresql/html/libpq-example.html
/Library/WebServer/Documents/postgresql/html/libpq-exec.html
/Library/WebServer/Documents/postgresql/html/libpq-fastpath.html
/Library/WebServer/Documents/postgresql/html/libpq-ldap.html
/Library/WebServer/Documents/postgresql/html/libpq-misc.html
/Library/WebServer/Documents/postgresql/html/libpq-notice-processing.html
/Library/WebServer/Documents/postgresql/html/libpq-notify.html
/Library/WebServer/Documents/postgresql/html/libpq-pgpass.html
/Library/WebServer/Documents/postgresql/html/libpq-pgservice.html
/Library/WebServer/Documents/postgresql/html/libpq-ssl.html
/Library/WebServer/Documents/postgresql/html/libpq-status.html
/Library/WebServer/Documents/postgresql/html/libpq-threading.html
/Library/WebServer/Documents/postgresql/html/libpq.html
/opt/local/include/postgresql90/internal/libpq
/opt/local/include/postgresql90/internal/libpq/pqcomm.h
/opt/local/include/postgresql90/internal/libpq-int.h
/opt/local/include/postgresql90/libpq
/opt/local/include/postgresql90/libpq/libpq-fs.h
/opt/local/include/postgresql90/libpq-events.h
/opt/local/include/postgresql90/libpq-fe.h
/opt/local/include/postgresql90/server/libpq
/opt/local/include/postgresql90/server/libpq/auth.h
/opt/local/include/postgresql90/server/libpq/be-fsstubs.h
/opt/local/include/postgresql90/server/libpq/crypt.h
/opt/local/include/postgresql90/server/libpq/hba.h
/opt/local/include/postgresql90/server/libpq/ip.h
/opt/local/include/postgresql90/server/libpq/libpq-be.h
/opt/local/include/postgresql90/server/libpq/libpq-fs.h
/opt/local/include/postgresql90/server/libpq/libpq.h
/opt/local/include/postgresql90/server/libpq/md5.h
/opt/local/include/postgresql90/server/libpq/pqcomm.h
/opt/local/include/postgresql90/server/libpq/pqformat.h
/opt/local/include/postgresql90/server/libpq/pqsignal.h
/opt/local/lib/postgresql90/libpq.5.3.dylib
/opt/local/lib/postgresql90/libpq.5.dylib
/opt/local/lib/postgresql90/libpq.a
/opt/local/lib/postgresql90/libpq.dylib
/opt/local/lib/postgresql90/libpqwalreceiver.so
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/libpqxx
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/libpqxx/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/libpqxx26
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/libpqxx26/Portfile
/usr/include/libpq
/usr/include/libpq/libpq-fs.h
/usr/include/libpq-events.h
/usr/include/libpq-fe.h
/usr/include/postgresql/internal/libpq
/usr/include/postgresql/internal/libpq/pqcomm.h
/usr/include/postgresql/internal/libpq-int.h
/usr/include/postgresql/server/libpq
/usr/include/postgresql/server/libpq/auth.h
/usr/include/postgresql/server/libpq/be-fsstubs.h
/usr/include/postgresql/server/libpq/crypt.h
/usr/include/postgresql/server/libpq/hba.h
/usr/include/postgresql/server/libpq/ip.h
/usr/include/postgresql/server/libpq/libpq-be.h
/usr/include/postgresql/server/libpq/libpq-fs.h
/usr/include/postgresql/server/libpq/libpq.h
/usr/include/postgresql/server/libpq/md5.h
/usr/include/postgresql/server/libpq/pqcomm.h
/usr/include/postgresql/server/libpq/pqformat.h
/usr/include/postgresql/server/libpq/pqsignal.h
/usr/lib/libpq.5.3.dylib
/usr/lib/libpq.5.dylib
/usr/lib/libpq.a
/usr/lib/libpq.dylib

How to tell pip to use this lib in /Library/PostgreSQL/9.1/lib/ (or may be in /usr/lib)? or may be install this lib again in my env (i try keep my env isolated from mac as possible)

© Server Fault or respective owner

Related posts about macosx

Related posts about postgresql