ProTip for Setting Up Django on OSX

Just got around to provisioning Django and Python on my (relatively) new MacBook Air for a project I’m working on in my spare time.  The fact that it’s months since I got this machine shows you just how much spare time I have.  That said, I have a confession: I completely suck at deploying things on OS X.  Particularly development things.  I can do this well on Linux environments, but for some reason I just have a really hard time getting Django running on a clean OS X environment.Generally speaking, here’s how it goes:

  1. Install the latest Django.
  2. Clone my project from Github.  Follow their excellent documentation to get my keys setup, etc.
  3. Run “python runserver”.
  4. Remember my project requires the Python Imaging Library (PIL).
  5. Download and start the install of the PIL.  Am told it requires Python 2.5 or greater by the OS X installer.
  6. Download Python 3.2, this doesn’t work.
  7. Download Python 2.7, this doesn’t work.
  8. Download Python 2.6, this doesn’t work.
  9. Download Python 2.5, this works.
  10. Now try to run Django and spend 45 minutes in PYTHONPATH hell.
  11. Give up and just re-run the Django installer, this fixes all my environment and pathing problems, and now it works.
  12. Want to kill everyone because this should be easier.

PROTIP for myself: install Django last.If anyone out there has any other tips for how to make this process easier, I’d love to hear them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s