philippe::niquille | regular niche market thoughts

django on OS X 10.4

Apr 29th 2007
3 Comments
respond
trackback

Tiger ships with Python 2.3.2 - install a new Python version with this Universal installer. The old installation residing in /Library/Python/.. does not get deleted, be sure to always use python2.5 from /usr/local/bin.
Also install PIL, the image library for Python.

Get the latest dev version of django to any directory:

svn co http://code.djangoproject.com/svn/django/trunk/

Copy the source to site-packages:

sudo cp -R django_src/django /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

Don’t use /Library/Python/2.3/site-packages/ since it’s the old version!

Install MySQL-DB or psycopg2 depending on what database you want to use. Using MySQL-DB be sure to set the path to mysql_config (for MySQL 5 installed):

export PATH=/usr/local/mysql-standard-5.0.27-osx10.4-i686/:$PATH
python2.5 setup.py build
python2.5 setup.py install

Voilà!

PS. Set the encoding ex. in model.py with # coding=utf-8 (as first line) if you have problems with üäö after running django.

3 Comments

  1. Simon Garcia

    dude i love you. you solved my problem installing mysqldb on osx
    why do you think the path change solved the issue?

  2. Wendy

    On this step:
    sudo cp -R django_src/django /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

    I don’t understand what django_src is referring to.

    After the previous step, svn downloaded a folder called “trunk” which contains the django folder, along with a bunch of other stuff. Has this been renamed? I’m thinking it has, and I should just replace django_src with trunk. There is no directory called django_src. Any help would be appreciated, almost there!
    Thanks,
    Wendy

  3. @Wendy: Yes, django_src is a directory whereto I downloaded the content of the svn trunk folder. the cp command was issued in the parent directory of django_src.

Incoming Links

Leave a Reply