1.如何配置Flask开发环境

                                                                                                                             如何配置Flask开发环境

1.Flask 环境安装

Flask depends on two external libraries, Werkzeug and Jinja2. Werkzeug is a toolkit for WSGI(Python Web Server Gateway Interface),the standard Python interface between web applications and a variety of servers for both development and deployment. Jinja2 renders templates.

Virtualenv

Virtualenv can be used to build a virtual enverionment ,in this enverionment, we can establish different project ,which use different version of Python, such as Python2.5,

Python2.7 ,etc. Virtualenv enables multiple side-to-side installations of Python ,one for each project ,It doesn't actually install separate copies of Python ,but it does 

provides a clever way to keep different project environments isloated .

First ,In the windows os ,use the command shell ,cmd, and type "pip install virtualenv" to install the virtualenv .

Second,use the cd command to change the directory to the place ,where you want to make project and type the "virtualenv Myweb2" ,


then the new folder  "Myweb2" will be created and some file be copied to this folder.

ry

use the cd command change the current directory to Scripts and type "activate" command

(Myweb2) E:\Myweb2\Scripts> will appear.


use "pip install flask"  to install flask into this folder


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值