Install Python and Flask (Windows 10)

Reference site

-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

Install Python and Flask (Windows 10)
Install python on windows
Install Python (for Windows)
Install and run Python3.5 + NumPy + SciPy on Windows 10
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Install ZIP version Python and pip on Windows 10
How to install Python [Windows]
Install watchdog on Windows + Python 3.3
Windows10: Install python dlib library
Install Python 3.7 and Django 3.0 (CentOS)
[Python] [Chainer] [Windows] Install Chainer on Windows
Python install in 2 lines @Windows
Install dlib for Python (Windows)
install python
[Windows] [Python3] Install python3 and Jupyter Notebook (formerly ipython notebook) on Windows
Python 3.6 on Windows ... and to Xamarin.
(Windows10) Install Linux environment and gnuplot.
Install python2.7 on windows 32bit environment
Install xgboost (python version) on Windows
Install Python on Windows + pip + virtualenv
Build and install OpenCV on Windows
Install Pytorch on Blender 2.90 python on Windows
Integrate Modelica and Python on Windows
Windows10: Install MeCab library in python
Install Python development environment on Windows 10
[Python Windows] pip install with Python version
Install easy_install and pip on windows
Install python and Visual Studio Code on windows10 (April 2020 version)
Python on Windows
How to install and use pandas_datareader [Python]
[Kivy] How to install Kivy on Windows [Python]
Install wsl2 and master linux on windows
python windows environment
Introductory Flask (Windows)
POST variously with Python and receive with Flask
Python installation (Windows)
Install Python locally
Install easy_install (Windows)
Install Python package management tool pip (Windows)
Install NAOqi python
[Beginner] Installing Python and running programs (Windows)
Install Python Control
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
CentOS8 --Install --Python3
Install Python3, numpy, pandas, matplotlib, etc. on Windows
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Notes on installing Python3 and using pip on Windows7
Installation of Python3 and Flask [Environment construction summary]
Install Python 3.5.1 + numpy + scipy + α in Windows environment
Launch a web server with Python and Flask
[Python] How to install OpenCV on Anaconda [Windows]
[Note] Installing Python 3.6 + α on Windows and RHEL
Install MongoDB on Ubuntu 16.04 and operate via python
Install Python and libraries for Python on MacOS Catalina
[python] Compress and decompress
Install pyenv and pyenv-virtualenv
How to install Python
Install Python on Pidora.
Install Scrapy on python3
python windows environment construction
Batch design and python