flask setup code example
Example 1: flask install
py -m pip install flask
setx PATH "%PATH%;C:\<path\to\python\directory\>\Scripts"
pip install flask
py -m pip install --trusted-host pypi.python.org pip flask
py -m pip install --user flask
py -m venv c:\path\to\new\environment
c:\path\to\new\environment\Scripts\activate.bat
Example 2: install flask
pip install flask
Example 3: install flask
pip install -U Flask
Example 4: flask app example
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__':
app.run()
Example 5: install flask in venv
$ pip install Flask