Mac python cannot be run after being packaged as app using py2app

1. Use py2app to package python files according to the tutorials on the Internet. When you get to python3 setup.py py2app, the following error occurs:
ValueError: New Mach-O header is too large to relocate in"/ Users/fengwenjun/PycharmProjects/data_masking_tool/dist/data_masking_tool.app/Contents/Resources/lib/python3.6/matplotlib/.dylibs/libpng16.16.dylib" (new size=1256, max size=1200, delta=108)

2. When using python3 setup.py py2app-An and using native dependencies to successfully create app, app still does not work properly.

3. The python file is as follows:

clipboard.png
data_masking_toolsetup.py:

clipboard.png
should the above python module file be added to the parameter DATA_FILES?

4. The packaged python file involves the matplotlib module. An error in the public network query seems to have something to do with this, but no suitable solution has been found.

I hope all experienced bosses can help with the answer. Thank you!

Mar.14,2021
Menu