problem with pyinstaller: packaging multiple python scripts under Mac

Discussion in 'Python' started by Boxuan Cui, Jun 25, 2013.

  1. Boxuan Cui

    Boxuan Cui Guest

    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
    Boxuan Cui, Jun 25, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward V. Berard
    Replies:
    4
    Views:
    896
    John B. Matthews
    Apr 4, 2006
  2. Alan Isaac
    Replies:
    0
    Views:
    302
    Alan Isaac
    Jun 23, 2007
  3. davidj411
    Replies:
    0
    Views:
    481
    davidj411
    Jun 27, 2008
  4. Alex Hall
    Replies:
    4
    Views:
    659
  5. Michael Herrmann
    Replies:
    18
    Views:
    128
    Kevin Walzer
    Dec 6, 2013
Loading...

Share This Page