Skip to content

Installing python and Django on Windows


Some notes on installing python amd Django on a Windows system.

1) download Anaconda3 (2.4.1)
* creates full phyton 3.5 environment with data analysis packages

2) check if django is installed
C:\Users\john.knight>python -c “import django; print(django.get_version())”
Traceback (most recent call last):
File “<string>”, line 1, in <module>
ImportError: No module named django

3) check the python directory
C:\Users\john.knight>where python

C:\Users\john.knight>cd C:\Anaconda3\Scripts
C:\Anaconda3\Scripts\pip install django
Collecting django
Downloading Django-1.9-py2.py3-none-any.whl (6.6MB)
100% |################################| 6.6MB 64kB/s
Installing collected packages: django
Successfully installed django-1.9

4) check the version
C:\Users\john.knight>python -c “import django; print(django.get_version())”

5) browse the Django tutorial for versin 1.9:

6) create the Django project
navigate to where the code should be stored
c:\Anaconda3>cd C:\Users\john.knight\OneDrive\Django

C:\Users\john.knight\OneDrive\Django>django-admin startproject mysite

This creates a folder called mysite with some contents.

7) Verify that Django site works
navigate to outermost mysite container
C:\Users\john.knight\OneDrive\Django\mysite>python runserver
Performing system checks…

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are app
Run ‘python migrate’ to apply them.
December 23, 2015 – 16:04:30
Django version 1.9, using settings ‘mysite.settings’
Starting development server at
Quit the server with CTRL-BREAK.

The warning about unapplied migrations can be ignored.
This has now started up a lightweight web server to test the Django site. The official diocumentation warns not to use this webs erver as production, only as development.

Browse to and you should see the site, albeit very sparse at this point in time.

View the Django documentation to see how to change the port and/or IP address used by the development web server.

Further post will step through creation of a Django application.


From → Development

Leave a Comment

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: