How to build a Django environment in Windows and Linux

Source: Internet
Author: User
Tags install django pip install django

Note: This article takes Python3 as an example, python2.x is the same as no longer repeat

Preparation: Python/python3 has been installed, if not please refer to the following information to install

Window Installation Python3

Linux installation Python3

    • window to install Django

Using PIP for installation

1. Open the cmd window

python3-m pip install Django or specify version python3-m pip install django==1.10.3

After waiting for installation to open Python3 's installation directory, you can see the Django executable file

2. Enter the command django-admin to see the relevant Django commands, the following interface appears to indicate that the installation was successful

3. Recommended installation of DJANGO-BOOTSTRAP3, Pymysql for better design templates

python3-m pip Install DJANGO-BOOTSTRAP3

python3-m pip Install Pymysql

=================================================================================================

    • Linux Install Django

PIP3 Install django==1.11.4

After the installation is complete, you will find that you cannot use django-admin directly and you will be prompted that the command does not exist.

Because we haven't created the link yet, I have mentioned it in Linux installation Python3.

Find the installation path for Python3

Enter the bin directory of the Python3 installation path to see the Django executable file

Create a link

Ln-s/usr/local/python3/bin/django-admin/usr/bin/django-admin3

Re-enter command django-admin3 The following interface appears, perfect ~ ~

Jiangzi Django Infrastructure is set up and you can create projects happily.

How to build a Django environment in Windows and Linux

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.