using pyinstaller on mac code example
Example 1: pyinstaller dmg on mac
pyinstaller myscript.py
Example 2: pyinstaller how to use mac
$ pyinstaller --onefile --windowed --icon icon.icns --name testApp main.py
pyinstaller myscript.py
$ pyinstaller --onefile --windowed --icon icon.icns --name testApp main.py