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

  • 相关阅读:
    Java学习之分支结构---判断语句:if语句和switch语句
    CSS知识点之字体大小属性font-size
    CSS小知识点一
    loadRunner之参数化,对用户名和密码进行参数化,并打印输出---实际操作:用户登录的账号用随机值来登录
    LoadRunner 场景运行error的几种情况
    loadrunner使用随机值
    loadrunner报错-持续更新
    关联及web_reg_save_param
    jenkins 提示No emails were triggered
    环境部署(八):jenkins配置邮件通知
  • 原文地址:https://www.cnblogs.com/justdba/p/5599807.html
Copyright © 2011-2022 走看看