Re: [Pythonmac-SIG] Py2app error

Discussion in 'Python' started by Mark Livingstone, Aug 2, 2012.

  1. Hi Guys,

    OK, taking Chris' advice, I installed on a Snow Leopard machine:

    cheyenne:dist marklivingstone$ ls ~/Downloads/
    About Downloads.lpdf numpy-1.6.2-py2.7-python.org-macosx10.3.dmg wxMac-2.8.12.tar
    matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg python-2.7.3-macosx10.6.dmg wxPython2.8-osx-docs-demos-2.8.12.1-universal-py2.7.dmg
    mercurial-2.2.3_20120707-py2.7-macosx10.7 scipy-0.11.0rc1-py2.7-python.org-macosx10.6.dmg wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg

    Then I went to Ronald's Bitbucket and built a current py2app setup.

    I tried a build but got this:

    python ../mac-setup/setup_py2app.py py2app
    Traceback (most recent call last):
    File "../mac-setup/setup_py2app.py", line 1, in <module>
    import wx
    File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
    line 45, in <module>
    from wx._core import *
    File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py",
    line 4, in <module>
    import _core_
    ImportError: dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
    2): no suitable image found. Did find:
    /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
    no matching architecture in universal wrapper
    cheyenne:src marklivingstone$

    I then did "python-32 ../mac-setup/setup_py2app.py py2app" , and built
    using py2app my Salstat.app which built fine and created a
    dist/Salstat.app

    However, when I try to run the app, I get the following in the console log:


    2/08/12 12:06:23.340 PM [0x0-0x421421].com.SalStat.SalStat:
    /Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/salstat.py:585:
    SyntaxWarning: import * only allowed at module level
    2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat:
    argvemulator warning: fetching events failed
    2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat: Traceback
    (most recent call last):
    2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat: File
    "/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/__boot__.py",
    line 319, in <module>
    2/08/12 12:06:23.373 PM [0x0-0x421421].com.SalStat.SalStat:
    _run('salstat.py')
    2/08/12 12:06:23.373 PM [0x0-0x421421].com.SalStat.SalStat: File
    "/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/__boot__.py",
    line 311, in _run
    2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat:
    exec(compile(source, path, 'exec'), globals(), globals())
    2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat: File
    "/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/salstat.py",
    line 9, in <module>
    2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat: import wx
    2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat: File
    "wx/__init__.pyc", line 45, in <module>
    2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat: File
    "wx/_core.pyc", line 4, in <module>
    2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat: File
    "wx/_core_.pyc", line 18, in <module>
    2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat: File
    "wx/_core_.pyc", line 11, in __load
    2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:
    ImportError: dlopen(/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so,
    2): no suitable image found. Did find:
    2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:
    /Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so:
    no matching architecture in universal wrapper
    2/08/12 12:06:23.479 PM SalStat: SalStat Error
    2/08/12 12:06:25.919 PM com.apple.launchd.peruser.501:
    ([0x0-0x421421].com.SalStat.SalStat[76293]) Exited with code: 255

    Is it just not possible to use py2app to create an app for the Mac based on wx?

    Also, the final result turns in at 184MB in size. Are there any common
    things that may be being pulled in that I should exclude?

    Thanks in advance,

    MarkL
     
    Mark Livingstone, Aug 2, 2012
    #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. Austin

    py2app on Mac OS X 10.3

    Austin, Dec 31, 2004, in forum: Python
    Replies:
    1
    Views:
    408
    Ronald Oussoren
    Dec 31, 2004
  2. Bob Swerdlow

    py2app can't find boot_app.py

    Bob Swerdlow, Mar 14, 2005, in forum: Python
    Replies:
    0
    Views:
    316
    Bob Swerdlow
    Mar 14, 2005
  3. bex

    OS X py2app confusion

    bex, Jul 25, 2005, in forum: Python
    Replies:
    1
    Views:
    460
  4. py2app and Bittornado

    , Aug 31, 2005, in forum: Python
    Replies:
    3
    Views:
    527
    Robert Kern
    Aug 31, 2005
  5. matchstick86

    sig : process vs. process(sig)

    matchstick86, Oct 12, 2009, in forum: VHDL
    Replies:
    1
    Views:
    574
    power_hf2005
    Oct 13, 2009
Loading...

Share This Page