Before you install Django, you need to install Python, pay attention to version support, have a table on the Django Web, different versions of Django-supported Python versions,
1. Install Python
Before installing Django, you need to install Python and download it directly to the website, not much.
Add environment variables after installation: The path to Python will be installed: computer-Properties-Advanced settings-environment variables, add a semicolon at the end of the path (C:\Users\422221\AppData\Local\Programs\Python\ PYTHON35) add it up.
2. Installing Django
Download the required version https://docs.djangoproject.com/en/1.11/, not much to say,
Select the version you want.
3, install Django, here is the focus, you need to use the command line to install.
Steps:
A, command line install Django
The Django downloaded from the official web is a compressed package, unzipped on any disk, through the command line into the directory where the setup.py is located, and then in the installation (Python setup.py)
Specific commands: cd d:\ learning \django\django-1.11.5\django-1.11.5 python setup.py install
If Python is not found, then the Python is not installed.
大概需要1分钟的时间安装完成,Django将被安装到Python安装目录`` 的site-package`` 目录(我的在C:\Users\422221\AppData\Local\Programs\Python\Python35-32\Lib\site-packages),当然有些依赖的文件也分别附加到Python 相关类库里了,这个系统安装的时候已经自动做好了
b, configuring environment variables
Add pathc:\users\422221\appdata\local\programs\python\python35-32\lib\site-packages\django-1.11.5-py3.5.egg\ Django;c:\users\422221\appdata\local\programs\python\python35-32\scripts (which is actually the Django directory installed, and the Scripts directory under Python)
C, to here is done, and then verify that there is no installation success
Access to the Django folder downloaded and unzipped from the official website via the command line
Specific: cd d:\ learn \django\django-1.11.5\django-1.11.5 enter Python to see the version of Python,
Then enter the following command
The installation of Python and the installation of Django have been completed here;
Install Jandgo under Windows