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
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
=================================================================================================
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