Introduction to Installing Flaskflask under Windows
is a lightweight Web application framework that is written using Python. Based on the Werkzeugwsgi Toolbox and the Jinja2 template engine. Flask uses BSD licensing.
Flask is also known as "microframework" because it uses a simple core and adds other features with extension. Flask does not have the default database, form validation tools used. However, Flask retains the elasticity of amplification, which can be added with flask-extension: ORM, form validation tools, file uploads, various open authentication technologies.
Prerequisites for flask Installation
1. The python2.x version is installed
2. Easy_install installed
Before installing flask, you must first install Python and easy_install,easy_ Install only support pyhon2.x version does not support the python3.x version, so you have to install Python when the best choice python2.x, I was loaded with python3.3 before, so then to download Python2.7,python and easy _install installation I will not introduce, to the official website to download the version of the installation can be
This is the official website of Python:
http://www.python.org/
This is the website of download Easy_install
: Http://pypi.python.org/pypi/setuptools can find the correct version to download. Win7 32-bit can download setuptools-0.6c11.win32-py2.7.exe. Note: The Win7 64-bit must be installed using ez_setup.py. By downloading ez_setup.py, the Python ez_setup.py is executed under CMD to automatically install the Setuptools. There are currently no direct EXE installation versions.
After installing Easy_install, add the directory where the Easy_install is located in the path of the system environment variable, for example: C:\Python27\Scripts
Start installation
If you have Python2.7 and East_install all installed, then we can install flask.
First open the console
Input Easy_install virtualenv, install virtualenv, this is mainly used to do the interpreter environment isolation, avoid multiple python on the same machine or multiple Python library dependencies
Easy_install JINJA2
easy_install Werkzeug
After the installation is complete, your own development environment can be common.
It is strongly recommended that you create a virtual environment through virtualenv, why? We are here to configure the Flask Framework , if you use a variety of frameworks, but each project is not the same, then this virtual environment is very necessary, the virtual environment is not independent. If you do not create a virtual environment then your framework configuration is global and does not preclude the possibility of interaction.
How do I create it? Let's take a demonstration , run cmd, first go to the directory where we need to create the environment, I will put it directly in the personal folder, according to your own needs to choose. Run virtualenv name This name refers to your virtual environment directory name, created after the virtual environment into the scripts directory, run Activate.bat, see (name) c:/users/zuojie/flaskspace/ Scripts> means that the framework you are installing behind is in this virtual environment.
Perform
Virtualenv Flasksapce
C:\PYTHON27>CD Flasksapce
C:\PYTHON27\FLASKSAPCE>CD Scripts
Activate.bat
This article is from the "Intelligent Future _XFICC" blog, please be sure to keep this source http://xficc.blog.51cto.com/1189288/1637623
Windows Python flask