python-Django安装查看(一)

时间:2022-03-26 00:31:10


1、Windows平台下如何安装Django: (推荐使用pip)


     C:\>cd Python27

    C:\Python27>cd Scripts

   C:\Python27\Scripts>pip install Django==1.8
    Collecting Django==1.8
    Downloading Django-1.8-py2.py3-none-any.whl (6.2MB)
    100% |################################| 6.2MB 819kB/s ta 0:00:01
   Installing collected packages: Django

    Successfully installed Django-1.8

   C:\Python27\Scripts>


2、如何查看已经安装成功和安装的版本:(在python交互模式下)

  >>> import django
  >>> django.VERSION
         (1, 8, 0, 'final', 0)
>>> print django.__path__
       ['C:\\Python27\\lib\\site-packages\\django']
>>>

3、Windows平台下如何卸载Django: (推荐使用pip)

         C:\Python27\Scripts>pip uninstall Django==1.8