WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Flask – Environment


Prerequisite

Python 2.6 or higher is typically required for installation of Flask. In spite of the fact that Flask and its dependencies work with Python 3 (Python 3.3 onwards), numerous Flask augmentations don't support it appropriately. Thus, it is recommended that Flask ought to be installed on Python 2.7.

Install virtualenv for advancement environment

virtualenv is a virtual Python condition manufacturer. It helps a client to make multiple Python environments one next to the other. In this way, it can maintain a strategic between from similarity issues between the various adaptations of the libraries.

Sudo apt-get install virtualenv

Once installed, new virtual environment is created in a folder.

mkdir newproj
cd newproj
virtualenv venv

To activate corresponding environment, on Linux/OS X, use the following −

venv/bin/activate

On Windows, following can be used

venv\scripts\activate

We are now ready to install Flask in this environment.

pip install Flask

The above command can be run directly, without virtual environment for system-wide installation.