Sunday, July 1, 2012

How to install Django on Mac Lion

I have been following below steps and successfully installed django on Lion without any problem.

Installing an official release with pip This is the recommended way to install Django.
  1. Install pip. The easiest is to use the standalone pip installer. If your distribution already has pip installed, you might need to update it if it's outdated. (If it's outdated, you'll know because installation won't work.)
  2. (optional) Take a look at virtualenv and virtualenvwrapper. These tools provide isolated Python environments, which are more practical than installing packages systemwide. They also allow installing packages without administrator privileges. It's up to you to decide if you want to learn and use them.
  3. If you're using Linux, Mac OS X or some other flavor of Unix, enter the command sudo pip install Django at the shell prompt. If you're using Windows, start a command shell with administrator privileges and run the command pip install Django. This will install Django in your Python installation's site-packages directory.
    If you're using a virtualenv, you don't need sudo or administrator privileges, and this will install Django in the virtualenv's site-packages directory.
     
I did using virtualenv since it provides isolation among different django project. Remember to activate virtual ENV since django is not installed system wide.

No comments:

Post a Comment