Reputation: 61
When I was building my python standalone app with command python setup.py py2app
, the output package fails to start. However, if I build with hot link python setup.py py2app -A
, it works fine.
I used PyQt for my app, maybe that causes the problem.
Here's 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's my crash log.
Please help to find out the problem, thank you!
Upvotes: 4
Views: 1637
Reputation: 1
I had a similar problem with my Text Editor. The solution I found here. In short:
Under the import statement add the following line:
sys.path = [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.6', 'lib-dynload')] + sys.path
You need to change the 'python2.6' into the actual Python version you use. 'python3' worked for me.
Upvotes: -2