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

53 Replies to “Set up Django on Windows 8 with Python 2.7”

  1. Thank you for putting in there to check your PATH. It was the one step I forgot and was starting to frustrate me. Easiest and best instructions online.

  2. Hello Jessy, thanks for the post. Found it really useful. I have the same ambition of being a cartoonist too. Have you started the learning process?

    1. Hi Dawhud,
      Great to hear from you !
      I have always loved doodling but my dream is to one day make animation but I have not had much time to work on that yet -_-

  3. I followed all the steps still getting Error as:
    Exception:
    Traceback (most recent call last):
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\basecommand.py”, l
    ine 122, in main
    status = self.run(options, args)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\commands\install.p
    y”, line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
    e=self.bundle)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\req.py”, line 1177
    , in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\index.py”, line 19
    4, in find_requirement
    page = self._get_page(main_index_url, req)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\index.py”, line 56
    8, in _get_page
    session=self.session,
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\index.py”, line 67
    0, in get_page
    resp = session.get(url, headers={“Accept”: “text/html”})
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\s
    essions.py”, line 468, in get
    return self.request(‘GET’, url, **kwargs)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\download.py”, line
    237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\s
    essions.py”, line 456, in request
    resp = self.send(prep, **send_kwargs)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\s
    essions.py”, line 559, in send
    r = adapter.send(request, **kwargs)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\a
    dapters.py”, line 305, in send
    conn = self.get_connection(request.url, proxies)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\a
    dapters.py”, line 215, in get_connection
    block=self._pool_block)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\p
    ackages\urllib3\poolmanager.py”, line 258, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\p
    ackages\urllib3\poolmanager.py”, line 207, in __init__
    proxy = parse_url(proxy_url)
    File “C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\_vendor\requests\p
    ackages\urllib3\util\url.py”, line 134, in parse_url
    raise LocationParseError(url)
    LocationParseError: Failed to parse: proxyserver:proxyport

    Storing debug log for failure in C:\Users\Aparna\pip\pip.log

    1. Thank you Afolabi! The Toon Boom software suite looks really easy to use. Would love it check it out some time. Did you create any animations with it?

  4. Thank u very much
    from many days i had tried to install django but not successfully inserted
    now i got the installation of django in window 8

  5. Hi, Your
    “https://docs.djangoproject.com/en/1.5/topics/install/#installing-official-release”
    ought to be updated to
    “https://docs.djangoproject.com/en/1.7/topics/install/#installing-official-release”.

  6. I’m puzzled by “The installation instruction on django site is extremely helpful.”

    The reason i came here was because i found the installation instruction on the Django site very UN-helpful. I’ll be asking you for help, if that’s still OK?

  7. I have read your article in great interest.
    I am new to Python and Django.
    So I spent so much time for setting up environment .
    At last after reading yours,I could got it.
    Thank you.

  8. Minnesota can face high damaging winds, and when you choose vinyl siding with this feature, you won’t
    have to worry about the siding panels lifting or separating from each other.
    To ensure that you have accurate estimates to compare
    and contrast, it is also very important to give each Contractor from whom you are collecting bids, the same information on the
    scope of work which needs to be completed so that each estimate is on the same playing field.
    In this article, we’ll discuss how to install them and why they are so important.

  9. The final of the top five free family blog sites <. However, plenty of new people in internet marketing that want their own websites have no idea what to look for when selecting a web host. WordPress: This is direct from the makers of Word – Press and does allow you to have a free website to get started with and build webpages to it.

  10. This design is wicked! You definitely know how to keep a reader
    entertained. Between your wit and your videos, I was
    almost moved to start my own blog (well, almost…HaHa!)
    Excellent job. I really loved what you had to say, and more than that, how you
    presented it. Too cool!

  11. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your blog?
    My blog site is in the exact same area of interest as yours and
    my users would definitely benefit from a lot of the information you provide here.
    Please let me know if this ok with you. Thanks a lot!

Leave a Reply

Your email address will not be published.