Django安装和配置环境变量

1、windows系统安装Djangopython

一、先安装python2.x or 3.x软件。(记得勾选pip3和添加python本身的环境变量)shell

下载地址:http://www.python.org/django

 

二、开始安装Djangowindows

方法一:less

#Install django
pip3 install django  或 进入到pip目录,执行pip.ext install django
#update django pip3 install django upgrade

安装完成功。测试

 

 方法二:spa

在windows系统中---个人电脑---属性----高级系统设置,详见下图---设置环境变量,找到PATH路径,以“;"号隔开,添加进去。3d

 

把下面两个路径添加到环境变量中:code

#diango路径

C:\Python3.5\Lib\site-packages\django\bin

#python 的scripts路径

C:\Python3.5\Scripts

添加配置环境变量的目的,就是让他能找到django-admin.pyorm

 

三、以管理员模式运行终端,再测试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) >>>
相关文章
相关标签/搜索