Posts Tagged ‘python django postgres psycopg2 mac os x’
Installing python, django, postgres, psycopg2 for Mac OS X
To install:
- Python 2.4.4
- Postgres 8.1
- Django 0.96
- psycopg2 — this is the postgresql adapter for python
Installation:
- The real pain is psycopg2. (You need this and will solve everything!)
- 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
- Make sure you have the PATH value defined for the new python 2.4 in your .bash_login file in your home directory.
- 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.