PC : Mac Development environment: Visual Studio Code
install flask
pip install flask
Run
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return '''
<html>
<body>
<h1>hello world</h1>
</body>
</html>
'''
if __name__ == '__main__':
app.run()
Check with browser http://127.0.0.1:5000/
Install the package for executable file
pip install pyinstaller
Executable file
pyinstaller flask_test.py --onefile
I was able to create an executable file for Mac without any problems By the way, it seems that it is not possible to create an executable file for Windows on Mac because it is not a cross compiler.
Recommended Posts