zoukankan      html  css  js  c++  java
  • windows环境下Django安装配置

    --python下载

    https://www.python.org/downloads/

    --pip 下载

    https://pypi.python.org/pypi/pip

    --pip 安装及路径

    解压 pip-8.1.2

    安装 python setup.py install

    --pip配置


    用户主目录下创建 D:Usersxu_jzpip

    pip/pip.ini
    [global]
    index-url = http://pypi.douban.com/simple

    pip install wheel --trusted-host pypi.douban.com
    pip install certifi --trusted-host pypi.douban.com
    pip install crab --trusted-host pypi.douban.com
    pip install influxdb --trusted-host pypi.douban.com
    pip install MySQL-python  --trusted-host pypi.douban.com
    pip install numpy --trusted-host pypi.douban.com
    pip install pandas --trusted-host pypi.douban.com
    pip install pika --trusted-host pypi.douban.com
    pip install pika-pool --trusted-host pypi.douban.com
    pip install psutil --trusted-host pypi.douban.com
    pip install psycopg2 --trusted-host pypi.douban.com
    pip install pymssql --trusted-host pypi.douban.com
    pip install pyodbc --trusted-host pypi.douban.com
    pip install python-dateutil --trusted-host pypi.douban.com
    pip install pytz --trusted-host pypi.douban.com
    pip install pywin32 --trusted-host pypi.douban.com
    pip install redis   --trusted-host pypi.douban.com
    pip install requests --trusted-host pypi.douban.com
    pip install setuptools  --trusted-host pypi.douban.com
    pip install six --trusted-host pypi.douban.com
    pip install thrift --trusted-host pypi.douban.com
    pip install tornado --trusted-host pypi.douban.com

    --添加pip环境变量
    C:Python27Scripts

    cd C:Python27Scripts

    pip

    --django安装

    解压  Django-1.9.6

    安装 python setup.py install

    import django    --测试是否正确安装

    --安装mysqldb库

    下载 MySQL-python-1.2.3.win-amd64-py2.7.exe     http://www.codegood.com/archives/129

    安装时报错 python version 2.7 required, which was not found in the registry

    http://www.cnblogs.com/justdba/p/5600635.html    --生成python文件,并运行

    --安装 requests库

    requests-2.10.0-py2.py3-none-any.whl 

    cd 文件目录

    pip install  requests-2.10.0-py2.py3-none-any.whl 

    --安装pymssql库

    cd 文件目录

    pymssql-2.1.1.win-amd64-py2.7.exe

    --查看python package

    pip list

    --创建工程和项目

    django-admin startproject mypro

    cd mypro

    django-admin startapp mysqltool

    python manage.py runserver

    --提示: You have unapplied migrations; your app may not work properly until they are applied.

    python manage.py makemigrations
    python manage.py migrate

    python manage.py runserver

  • 相关阅读:
    Access Violation
    虚拟目录的配置(tomcat服务器)
    CSS3 实现滚动字幕效果(即跑马灯)
    css3 textshadow
    iScroll4 禁止select等页面元素默认事件的解决方法
    软件评测师考试总复习19(文档测试)
    软件评测师考试总复习15(兼容性测试)
    软件评测师考试总复习16(标准符合性测试)
    软件评测师考试总复习17(易用性测试)
    软件评测师考试总复习18(可靠性测试)
  • 原文地址:https://www.cnblogs.com/justdba/p/5599807.html
Copyright © 2011-2022 走看看