Tuesday 15 November 2011

Installing Psycopg on Mac OS X (Lion) - Part 2

I now know that all the problems had been caused by architecture mismatches and I found some very good instructions by Pablo Casadro.

While his instructions listed all the steps and missteps he took I've decided to just list what I did and how it worked.


export PATH=$PATH:/Library/PostgreSQL/9.1/bin/
  • Set env to correctly mark the architecture
sudo env ARCHFLAGS="-arch i386 -arch x86_64"

  • Used Easy Install to install the package
sudo easy_install psycopg2
This was then tested by seeing if I could import the module and finally I tested it by seeing if Django would start

python manage.py runserver 8080
This confirmed everything was working and I could now find the next area to be frustrated with.