Installing and Running Django on a Mac - Part 1 - Getting Ready

I'm a recent Mac convert.  For the most part I've loved all the perks of being a Mac user but I've run into a road block recently.  Apparently getting my favorite web application framework, Django and its various dependencies running on OS X to do local development is not as easy or clear as it is on other platforms like windows or linux.  This may be thanks to my limited knowledge of BSD's querks or simply that not many people run Django on the Mac.  To make things even more complicated I want to run the NewFormsAdmin branch instead of the current 0.96 release.  Since I'm sure I'm not the only person running into troubles and confusion with this here's a step-by-step guide on how to get Django running on your Mac!

  • Install Xcode - You will need the tools included in Xcode to build and install many of Django's Pre-requisites.  To get Xcode you can either install it from your OS X install DVD or you can download it from Apple Developer Connection (ADC).  If you choose to download Xcode be aware that you will need to register (for free) and that the download is a little under 1 GB in size.  Otherwise if you install from DVD remember to run Software Update (System Prefrences > System > Software Update), there have been several updates to Xcode since its release.

  • Download and install MacPorts - What's MacPorts you ask?  MacPorts is a package mananagement tool that handles obtaining, building, and installing dozens of open source applications and tools onto a Mac.  Once you download MacPorts mount the DMG image and run the installer package.  Generally accepting the defaults for the installer is fine.  Once installation you will have a new command available in your terminal called port.

  • (Optional) Download and install PortAuthority - PortAuthority is a GUI frontend to MacPorts.  I love the command-line but sometimes for things like package managers a GUI can be nice to more easily search and browse around.  NOTE - PortAuthority costs $20 but offers a 30 day trial.

At this point you have all the resources you will need to install Django and it's dependencies.   Check back tomorrow to see how to do the actual install.