Installing Django under Windows

Source: Internet
Author: User
Tags install django git commands

Django is a very popular open source web framework, based on the MVC pattern, emphasizing rapid development with many powerful third-party plugins that developers can use to quickly and easily develop their own websites. This article describes how to install Django under Windows systems.

Install Python

As a Python web framework, you need to install Python before you install Django, but different versions of Django are not the same for Python versions, so refer to the table below.

Django Version python version
1.4 2.5, 2.6, 2.7
1.7, 1.8 2.7, 3.2, 3.3, 3.4
1.9 2.7, 3.4, 3.5

Install Python under Windows, you can download the Windows installation package on the official Python website: Python download link
You can refer to the article "How to install Python under Windows," which is not described here.

Uninstall the old version of Django

If you've ever python setup.py install installed Django in the way you used to, you'll need to delete the Django directory in the Python site-packages directory.
In order to know the location of the directory, you can execute the following command in CMD (note that it is not in the execution environment of Python):

python"import sys; sys.path = sys.path[1:]; import django; print(django.__path__)"
Download the Django Code

The latest version of Django Code is on GitHub, and you can get the latest version of Django with Git commands.

clone https://github.com/django/django.git

Or, download the Django package: Download link
If you need to use Django in a formal production environment, it is recommended that you choose a stable version of Django, such as Django 1.8.

Installing Django

Open cmd, enter the Django code directory (for example, CD django-x.y), execute the command

install

You can see the cmd window output a large string of installation information, patiently waiting for a while after the installation is over.

Verifying the installation

In order to verify that the installation was successful, you can verify it by entering the following command in the Python prompt.

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

You can see that the Django version number was correctly output and the installation was successful.

Reference
    1. How to get Django
    2. How to install Django
    3. Quick Install Guide
    4. Faq:installation
    5. How to install the Django on Windows

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Installing Django under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.