tring tring – research log

research log

Posts Tagged ‘python django postgres psycopg2 mac os x

Installing python, django, postgres, psycopg2 for Mac OS X

with one comment

To install:

  1. Python 2.4.4
  2. Postgres 8.1
  3. Django 0.96
  4. psycopg2 — this is the postgresql adapter for python

Installation:

  1. The real pain is psycopg2. (You need this and will solve everything!)
    1. To avoid this just use MacPorts to install psycopg2. I did it by running the command “sudo port install py-psycopg2″. This will also install Postgres 8.1 and install python 2.4
    2. Make sure you have the PATH value defined for the new python 2.4 in your .bash_login file in your home directory.
    3. Now use MacPorts to install django 0.96.

By doing this we stay out of the MacPython stuff. What happened to me was initially I had installed MacPython 2.5 using the installer, then I installed django 0.96 and postgres. But when I had to install psycopg2, then the real trouble began. So I reverted to using MacPorts and I used the steps I have mentioned above.

Please, if you need some quick tips about how to use MacPorts, look at my earlier post. It will save you some time digging around.

Written by tringer

January 7, 2008 at 5:43 pm