-Try the minimum configuration of "Flask" in Python3.7 windows10 environment
Install Python 3.7 https://www.python.org/downloads/release/python-376/
DL installer type (Windows x86-64 executable installer
) from above
Install (rerun if PATH is not available
Modify → add python to environment variables and reinstall
Check if it is installed
python -V
Python 3.7.6
After confirming Python installation, install Flask with the following command
pip install flask
Create main.py in the working directory and write the following
#coding:utf-8
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return "Hallo World!"
if __name__ == '__main__':
app.debug = True
app.run()
#If you set the debug mode to True, the changes will be reflected immediately.
#File encoding is UTF-Save at 8
#Type the URL below into your browser to open the page
# http://127.0.0.1:5000/
Then execute the following command in the working directory
python main.py
The app will run, so go to http://127.0.0.1:5000/ to check
Recommended Posts