Install Django on OS X 10.8 Mountain Lion

You can verify that Python is already installed by typing python from your shell; you should see something like:

Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

The recommended way to install Django is installing an official release with pip. First we need to install pip:

sudo easy_install pip

Then install python:

sudo pip install django

To verify that Django can be seen by Python, type python from your shell. Then at the Python prompt, try to import Django:

>>> import django
>>> print django.get_version()

To create a new project, you need to change permissions on file

sudo chmod +x /Library/Python/2.7/site-packages/django/bin/

Now you’re ready to create a new project: startproject mysite

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

%d bloggers like this: