一、windows系統安裝Django
1、先安裝python2.x or 3.x軟件。(記得勾選pip3和添加python自己的環境變量)
下載地址:http://www.python.org/
2、開始安裝Django
方法一:
#Install django pip3 install django 或 進入到pip目錄,執行pip.ext install django
#update django pip3 install django upgrade
安裝完成功。
方法二:
在windows系統中---我的電腦---屬性----高級系統設置,詳見下圖---設置環境變量,找到PATH路徑,以“;"號隔開,添加進去。
把下面兩個路徑添加到環境變量中:
#diango路徑 C:\Python3.5\Lib\site-packages\django\bin #python 的scripts路徑 C:\Python3.5\Scripts
添加配置環境變量的目的,就是讓他能找到django-admin.py
3、以管理員模式運行終端,再測試dajango是否安裝成功
#切換到django項目的目錄
C:\Users\Administrator>d: D:\>cd python\django_lesson D:\python\django_lesson>python3 manage.py shell Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>>