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:
- Install the latest Django.
- Clone my project from Github. Follow their excellent documentation to get my keys setup, etc.
- Run “python manage.py runserver”.
- Remember my project requires the Python Imaging Library (PIL).
- Download and start the install of the PIL. Am told it requires Python 2.5 or greater by the OS X installer.
- Download Python 3.2, this doesn’t work.
- Download Python 2.7, this doesn’t work.
- Download Python 2.6, this doesn’t work.
- Download Python 2.5, this works.
- Now try to run Django and spend 45 minutes in PYTHONPATH hell.
- Give up and just re-run the Django installer, this fixes all my environment and pathing problems, and now it works.
- 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.
