These are the steps to create a flask applications as window services in windows 10 and python 3.8 uning pyinstaller
Based on [https://stackoverflow.com/questions/55677165/python-flask-as-windows-service]
It is required to install all the libraries in virtual enviroment to be able to work
pip install virtualenv
python -m venv venv
.\venv\Scripts\Activate
pip install -r requirements.txt
The following commannd will generate a .exe in dist directory
pyinstaller --onefile --hidden-import win32timezone win32_service.py
cd dist
cd .\win32_service.exe debug
Check in browser http://localhost:8000/ to find the "hellow world"
Ctrl C to kill the application, close the terminal windows because it kept running
Open a new powershell with admin priviliges
cd dist
.\win32_service.exe install
Now, open the “Services” msc snap in
mmc Services.msc
Look for the service names "FlaskAppTest" and run it manually
Check in browser http://localhost:8000/ to find the hellow world