1.Install package “py2app”.
1  | pip install py2app  | 
2.Package the python’s program into ‘setup.py’
1  | py2applet --make-setup xxx.py  | 
3.Encapsulate the ’setup.py‘ into an app
1  | python setup.py py2app -A  | 
ps:
1  | When an error is reported, you need to open setup Py file to change  | 
1  | """  |