如何配置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