-
Install Python 3 from https://python.org (using admin priviledges and adding python.exe to the path) - I've got Python 3.12.7.
-
Install py4web as usual - I've done it in Desktop/py4web with the "Try me (from source - locally)" https://py4web.com/_documentation/static/en/chapter-03.html#installing-from-source-locally procedure. It's better to use venv or a full VM ...
-
install PyInstaller with:
sudo -H pip3 install --upgrade pyinstaller
(I've got PyInstaller-6.11)
-
install psycopg2 with:
pip3 install --upgrade psycopg2-binary
(if you don't need the PostgreSQL database adapter, you can avoit this - but also remove any related reference from inside the .spec file later)
-
install the dateutil module with:
pip3 install --upgrade python-dateutil
(it's needed by some py4web tutorial, you can avoit this - but also remove any related reference from inside the .spec file later)
-
copy extras, build_py4web.py, py4web-gui.mac.spec and py4web.mac.spec from this repository to Desktop/py4web
-
copy py4web-gui.py from https://github.com/nicozanf/py4web-gui to Desktop/py4web
-
install py4web-gui requirements with:
pip3 install --upgrade psutil tomlkit
-
open a Terminal and go to Desktop\py4web. Run:
python3 build_py4web.py
If everything goes fine, you'll obtain the 64 bit binary build zipped as Desktop/py4web\py4web_osx_versionxxxx.zip.
I've used MacOs 12.7.4 (Monterey)
If you open a py4web shell, the quit() command does not work. Use sys.exit() instead.