Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49243 > unrolled thread

problem with pyinstaller: packaging multiple python scripts under Mac

Started byBoxuan Cui <boxuancui@gmail.com>
First post2013-06-25 16:03 -0400
Last post2013-06-25 16:03 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  problem with pyinstaller: packaging multiple python scripts under Mac Boxuan Cui <boxuancui@gmail.com> - 2013-06-25 16:03 -0400

#49243 — problem with pyinstaller: packaging multiple python scripts under Mac

FromBoxuan Cui <boxuancui@gmail.com>
Date2013-06-25 16:03 -0400
Subjectproblem with pyinstaller: packaging multiple python scripts under Mac
Message-ID<mailman.3885.1372243291.3114.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

This is my first time using pyinstaller. My goal is to build an .app in Mac. The app is basically a GUI written in PySide, and I have about 7 different Python scripts + 1 .png file. The main file calls 4 of the files, and the 4 files will call the rest of the 2 files repeatedly. The .png file is nothing but the window logo. Could someone help me with some diagnosis? I do not know what went wrong. I searched a lot of documentations online, i.e., change spec, add import, ... etc. but my app still doesn't run.

FYI, Pyinstaller could generate an app for me, but there are two issues:
1. Icon is not changed for the app.
2. App crashes when opened.

My Python version is 2.7.5 and I am using PyInstaller-2.0. Here is my code for packaging:
python pyinstaller.py --onefile --windowed --name=MyApplication -i ~/Documents/AASource/icon.ico ~/Documents/AASource/Scripts/main_file.py
Here is the spec file:
# -*- mode: python -*-
a = Analysis(['/Users/boxuancui/Documents/AASource/Scripts/main_file.py'],
             pathex=['/Users/boxuancui/Documents/pyinstaller-2.0'],
             hiddenimports=[],
             hookspath=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name=os.path.join('dist', 'MyApplication'),
          debug=False,
          strip=None,
          upx=True,
          console=False , icon='/Users/boxuancui/Documents/AASource/icon.ico')
app = BUNDLE(exe,
             name=os.path.join('dist', 'MyApplication.app'))
Here is part of the crash message:
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000054d8
Thanks in advance! Any help will be appreciated!


Best,
Boxuan

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web