Installing Flask on Windows.

As we have earlier learnt about django for WebDevelopment in Python. Now we will learn how to install Flask in Windows.

We have assumed that Python and PIP are installed and proper path is setup.

Open the Command Prompt and write command

pip install flask
Flask Installation on Windows

Now we have to install Virtual Environment using :

pip install virtualenv

It will install virtual environment to work with

Virtual Environment Installation

Now we have to create a file name app.py in a blank folder that contains:

from flask import Flask, redirect, url_for, request 
app = Flask(__name__) 

def index():
    return '<b>Your Flask installation is success</b>' 

if __name__ == '__main__':
    app.run(debug = True) 

Then once again move to that folder in command prompt and run the python command

python app.py

You will get screen like

Now Visit : in your browser you will get screen like:

Leave a Reply

Your email address will not be published. Required fields are marked *

× How can I help you?