Create a basic hello world using flask:

mkdir /tmp/project
cd /tmp/project


from flask import Flask
app = Flask(__name__)

def hello():
    return 'Hello World!'
if __name__ == '__main__':'')

Instal flask:

 pipenv install flask

test the app:

pipenv shell

Install pyinstaller:

pipenv install pyinstaller

Create the requirements.txt:

pipenv run pip freeze > requirements.txt

Create the binary:

 pyinstaller --onefile

Test & run:


Done :-)