Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Flask on Windows?

Tags:

python

flask

I have a project to do for after create a webpage that display the latest weather from my CSV file.

I would like some details how to do it (don't really get the http://flask.pocoo.org/docs/installation/#installation installation setup)

Can anyone mind explain me how to do it simply?

Thanks.

I'm running on Windows 7, with the Windows Powershell.

like image 336
Nardrek Avatar asked Jul 29 '13 06:07

Nardrek


People also ask

How do I run a flask on Windows 10?

To install Flask in Windows follow the following steps: Step 1: At first, open the command prompt in administrator mode. Then the following command should be run. This command will help to install Flask using Pip in Python and will take very less time to install.

How do you install a flask without pip?

download those packages and install them first. download all those from pypi and install using python setup.py install for every module. Now you can install flask by running python setup.py install in the flask source code folder. Now you system is acquainted with flask.


2 Answers

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.

like image 188
Uku Loskit Avatar answered Sep 21 '22 13:09

Uku Loskit


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/

like image 39
imbond Avatar answered Sep 23 '22 13:09

imbond