004--Python的DJango安装

1.环境搭建

  • Setuptools下载地址:https://pypi.python.org/pypi/setuptools
  • PIP下载地址:https://pypi.python.org/pypi/pip#downloads
  • DJango下载地址:https://www.djangoproject.com/download/
  • ez_setup脚本下载地址:https://bootstrap.pypa.io/ez_setup.py
  • get-pip脚本下载地址:https://bootstrap.pypa.io/get-pip.py

2.核心思想

  • easy_insall的作用和perl中的cpan, ruby中的gem类似,都提供了在线一键安装模块的傻瓜方便方式,而pip是easy_install的改进版
  • pip 提供更好的提示信息,删除package等功能。老版本的python中只有easy_install, 没有pip。

3.安装教程

  • PIP安装参考:https://jingyan.baidu.com/article/363872ec3ff8366e4ba16f9e.html
  • setupTools安装参考:http://blog.csdn.net/wuxiaobingandbob/article/details/53010242

4.新版安装

  • psython下载地址:https://packaging.python.org/tutorials/installing-packages/
  • 条件一:Ensure you can run Python from the command line 确定你可以运行Python
  • 条件二: Ensure you can run pip from the command line 确定你可以运行PIP
  • 总结:因为只装载了Python环境,所以只满足条件一,但是不满足条件二
释意:这将安装或升级pip。另外,如果没有安装,它将安装setuptools和wheel。

5.安装PIP方法

  • 下载地址:https://pypi.python.org/pypi/setuptools
    004--Python的DJango安装_第1张图片
  • 安装PIP:拷贝get-pip内容,执行脚本python get-pip.py
    004--Python的DJango安装_第2张图片

    -配置环境变量,将Python安装目录下的Script配置到环境变量中,运行 pip查看成功与否
    004--Python的DJango安装_第3张图片

6.安装DJango方法

  • 下载地址:https://www.djangoproject.com/download/
    004--Python的DJango安装_第4张图片
  • 配置环境变量:确认python和python中的django都在路径中
    004--Python的DJango安装_第5张图片
  • 验证DJango成功与否
    004--Python的DJango安装_第6张图片

7.最终解决方案

  • DJango1.8下载地址:https://github.com/django/django/releases?after=1.11.4
  • 解压之后,执行python setup.py install
  • 安装成功,打印本版号
    -配置到Path中:C:\TT_SoftWare\TT_Python\Lib\site-packages\Django-1.8.18-py2.7.egg\django\bin

你可能感兴趣的:(004--Python的DJango安装)