Py2app error with pyQt5

When I created a standalone python application with a command python setup.py py2app, the output package does not start. However, if I build with a hot link python setup.py py2app -A, it works fine.

I used PyQt for my application, maybe this is causing the problem.

Here is my setup.py:

"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['teammaker.py']
DATA_FILES = ['ui.py']
OPTIONS = {'argv_emulation': True, 'includes':['sip','PyQt5','PyQt5.QtWidgets']}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

and here is my crash log.

Please help find the problem, thanks!

+4
source share
1 answer

I had a similar problem with my text editor. The solution I found here . Shortly speaking:

  • boot.py dist/name_of_your_program.app// (Finder .app).
  • def _run()
  • :

    sys.path =   [os.path.join(os.environ ['RESOURCEPATH'], 'lib', 'python2.6',   'lib-dynload')] + sys.path

"python2.6" Python, . "python3" .

-2

All Articles