«

Technicality

· 31ST OF OCTOBER, THE YEAR 2007

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:

  1. In the psycopg dir, edit setup.cfg and add the line

    library_dirs=/opt/local/lib

  2. Add a symbolic link to patch weird zlib issues:

    ln -s /opt /Developer/SDKs/MacOSX10.4u.sdk/opt

    I 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.

NO COMMENTS YET

LEAVE A COMMENT

(required)
(required)