Set up Django on Windows 8 with Python 2.7

This posts documents the steps I took to set up Django on my Windows 8 box.

What is Django

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Who Uses Django

Disqus, Instagram, Mozilla, Pinterest, and many more

Tested Steps to Install Django on Windows 8

The installation instruction on django site is extremely helpful.

Below are the steps I took to install Django on my Windows 8 box

1) Install Python 2.7
Though the latest Python version is version 3.3, Django’s support for python 3.2 and 3.3 are only experimental

Download python 2.7: http://www.python.org/download/releases/2.7/

Install with all default settings (just click next all the way)

When done, the Python 2.7 is installed in C:\Python27

2) Install official release of Django

https://docs.djangoproject.com/en/1.5/topics/install/#installing-official-release

– use the standalone pip installer

2.1) download ez_setup.py and get-pip.py and save them to a directory say c:\dev\python

2.2) Install pip

cd c:\dev\python
python ez_setup.py
cd c:\dev\python
python get-pip.py

2.3) Install Django source using pip
Open a Windows commandline prompt: Ctrl+r and type “cmd”
Test by typing “pip” at the command-line prompt
If pip is not found, then the $PATH may not be set correctly.

  • You could either add c:\Python27\Scripts (if your python2.7 is installed under C:\Python27) to the PATH. If you don’t know how to do this, see here
  • Or you can run C:\Python27\Scripts\pip
pip install Django

or

c:\Python27\Scripts\pip install Django

3) Verify Django install

$py
>>>import django
>>>print (django.get_version())
1.5.5