|
Flask need to install python2.5 or later, does not currently support python3, which wsgi standard has not been finalized;
First, install virtualenv, for each pyhton applications "install" a separate python environment;
Using the command: sudo easy_install virtualenv
Or higher: sudo pip install virtualenv
In under Ubuntu: sudo apt-get install python-virtualenvsome code
Two, virtualenv use:
$ Mkdir myproject
$ Cd myproject
$ Virtualenv env // Create a directory called env, and this directory is a separate python environment
. $ Env / bin / activate // activation environment named env, pay attention to the point about the space behind. "";
// Each first activate the corresponding environment related development progress;
some code
Three, Flask installation, use the following command:
$ Easy_install Flask
some code
In addition, with the git retrieval methods, install the latest Flask:
$ Git clone http://github.com/mitsuhiko/flask.git // download the installation file
$ Cd flask
$ Virtualenv xxx
$. Xxx / bin / activate
$ Python setup.py develop
some code |
|
|
|