First, make sure you have Python installed on your machine.
Second, download Django
(1) Method 1: Download the zip package directly from the GitHub project address, the address is Https://github.com/django/django, recommend this, the speed will be faster
(2) Method 2: If you do not like the way above, you can directly use the Git hub clone way, $ git clone git://github.com/django/django.git django-trunk
Third, after the Django file download is complete, open your Git bash
Enter the following code:
$ "from distutils.sysconfig import get_python_lib; Print (Get_python_lib ()) "
With this, you can get the site-packages path to the python installed on your machine, the path on my computer is: d:/python34/lib/site-package
Then associate Django with Python with the following command.
$working-dir/django-trunk > Site-packages-dir/django.pth
Working-dir is the directory where you install Django, Site-packages-dir is the Python site-packages path you just acquired, instead of the words above.
After entering the above command, no information will be prompted and nothing will be displayed if the execution succeeds.
V. Whether the test has been successfully correlated:
Open your Python shell and execute the following command:
>>> Import Django
>>> django.get_version ()
' 1.9 '
>>>
If you get the results, then the installation is successful.
Reference link: https://docs.djangoproject.com/en/1.7/topics/install/#installing-development-version
Installing Django on Windows 7