Django and OSX

Those who have been here before know that I am a big fan of the Django python webframework, and also a big fan of OS X. So I thought that I would install Django on my MacBook Pro.

I did have it all installed on my G4 laptop, but I am going to be using it with at least two different databases on this machine. I am not going to give a complete, what I typed style install, just an overview because it is fairly easy.

1. Install latest version 2.4.* of Python from http://www.pythonmac.org
2. Check out the development version of Django from http://www.djangoproject.com/download/ (I checked it out in /django - probably not the best place to put it.)
3. Install latest stable version (5.1) of MySQL from http://www.mysql.com/
4. Install latest stable version of MySQL tools http://www.mysql.com/products/tools/administrator/
5. Install MySQLdb from http://www.pythonmac.org/packages/py24-fat/index.html
6. Create a symlink so Python can find django: ln -s /django/django_src/django/ /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django
7. Then I followed some instructions on blog.vixiom.com to add the path that I need.
8. edit your .bash_profile file in your home directory with the following path: /django/django_src/django/bin/:/Library/Frameworks/Python.framework/Versions/Current/bin:

Now that should be everything needed to start running with Django and MySQL. PostGreSQL is of course the better database but for the testing work that I am doing my webhost at the moment doesn’t support PostgreSQL..


Leave a Reply

Bad Behavior has blocked 686 access attempts in the last 7 days.