Installation Prerequisite
It requires python 2.6 or higher for the installation of flask. Well, flask had its dependencies to work really well with python3 (actually python 3.3) onwards and many flask extensions that do not support it properly. So, it is actually recommended to install flask python 2.7.
Install Virtualenv
Virtualenv is basically a Virtual Python Environmental Builder. It creates a virtual environment with an isolated python installation. Virtualenv creates a folder which contain all necessary executables to use the packages that a python project would needed.
How to install Virtualenv?
For Windows installation:
we use the following command to install
pip install virtualenv
well this may require administrative privileges.
For Linux/Ubuntu installation:
we use the following command to install
Sudo apt-get install virtualenv
On Linux/Ubuntu virtualenv may be install using its package manager using its sudo apt to get install. Once it get installed, new virtual environment is created in a folder.
On Windows, to activate a corresponding environment following can be used
venv\scripts\activate
On Linux, following can be used
venv/bin/activate
Flask installation
Pip install flask
Using this command it can be run directly so it wouldn’t need any virtual environment because we are installing this system wide.