INSTALLING PSYCOPG2 IN MAC OS 10.4 WITH MACPYTHON AND MACPORTS
For some foolish reason, I installed MacPython on a MacBook Pro (Intel) and installed PostgreSQL with MacPorts. When I tried to install psycopg2, I was getting it kept breaking when it couldn’t find the libraries Python said were probably in /opt /Developer/SDKs/MacOSX10.4u.sdk/ and Postgres said were /opt/local/. libz was being especially problematic.
My solution:
- In the psycopg dir, edit
setup.cfgand add the linelibrary_dirs=/opt/local/lib - Add a symbolic link to patch weird zlib issues:
ln -s /opt /Developer/SDKs/MacOSX10.4u.sdk/optI know this is unpleasant, but it works. Got the idea from here.
Now the build should work. I still got warnings about arch conflicts, but I think this has something to do with it trying to build versions for both PPC and 386, and since I only need the 386 version, I blissfully ignore such warnings.





