Running Psycopg2 and Python on OSX 10.6.8
I just wasted my weekend getting psycopg2 running on OSX 10.6.8. These things always seem easy at first but rarely work out that way. There are lots of posts pointing to a similar problems to the one I experienced but none offered a solution that worked for me. The bottom line is that Python can not run in 64-bit mode with psycopg2. The posts and tutorials I found mentioned this but none provided a solution for a virtual environment (virtualenv). Fortunately for you the solution is dead simple and I have documented it below, but first, to make sure your problem is the same as mine, the problem can easily be replicated by running the following in the python interactive shell:
jnorthrop:~$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import...