Videos
How to install Flask in Python?
To install Flask in Python, activate your virtual environment and run the command: pip install flask
What is Flask?
Flask is a micro Python web framework used to build web applications. It's easy to use and great for beginners in web development.
Do I need to install Python before installing Flask?
Yes, since Flask is a Python module, you need to have Python installed on your system before installing Flask.
Install pip as described here: How do I install pip on Windows?
Then do
pip install flask
That installation tutorial is a bit misleading, it refers to actually running it in a production environment.
First install flask using pip,
pip install Flask
* If pip is not installed then install pip
Then copy below program (hello.py)
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
Now, run the program
python hello.py
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Just copy paste the above address line in your browser.
Reference: http://flask.pocoo.org/
» pip install Flask
» pip install pillow