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


Groups > comp.lang.python > #26379

Re: [Pythonmac-SIG] Py2app error

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <livingstonemark@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'log:': 0.04; 'importerror:': 0.05; 'received:209.85.160.174': 0.07; 'wrapper': 0.07; 'python': 0.09; 'app,': 0.09; 'exited': 0.09; 'path,': 0.09; 'skip:[ 30': 0.09; 'subject:error': 0.11; '2):': 0.16; '255': 0.16; 'advice,': 0.16; 'bitbucket': 0.16; "chris'": 0.16; 'globals(),': 0.16; 'guys,': 0.16; 'py2app': 0.16; 'skip:" 100': 0.16; 'skip:d 150': 0.16; 'subject:] ': 0.19; 'app': 0.19; 'module': 0.19; 'skip:" 30': 0.20; 'import': 0.21; 'setup.': 0.22; 'universal': 0.22; 'matching': 0.23; 'this:': 0.23; 'installed': 0.23; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'common': 0.26; '(most': 0.27; 'found.': 0.27; 'message- id:@mail.gmail.com': 0.27; 'went': 0.28; 'fine': 0.28; 'run': 0.28; 'skip:_ 10': 0.29; 'skip:( 40': 0.30; 'error': 0.30; 'file': 0.32; 'mac': 0.32; '11,': 0.33; 'traceback': 0.33; 'turns': 0.33; 'to:addr:python-list': 0.33; 'code:': 0.33; 'received:google.com': 0.34; 'architecture': 0.34; 'thanks': 0.34; 'skip:. 20': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'created': 0.36; 'but': 0.36; 'skip:m 40': 0.36; 'should': 0.36; 'skip:p 20': 0.36; 'possible': 0.37; 'ok,': 0.37; 'level': 0.37; 'being': 0.37; 'received:209': 0.37; 'things': 0.38; 'to:addr:python.org': 0.39; 'build': 0.39; 'skip:" 10': 0.40; 'subject:-': 0.40; 'header:Received:5': 0.40; 'taking': 0.65; 'skip:n 40': 0.72; 'skip:/ 120': 0.84; 'snow': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8GWsiivpmlL0vujrD9RicOwp2quK2oFdP+Q2i7AzDUk=; b=ThN3Hvr4jIiG8G5w1rhXPFINRMfDGTUJzGcm0/zPIH7OBiKjh5nmveU0wNG3s+mxAs nont1NFV/oi/2uh/Fv8XRlCHJRVDtmNnNL3R6nK7j4Yeco1k1z1vy2U5oa0ib4IaBrJW x5XxQoU74YijXB+adFiKBEQyQy3aHlrUPV9QA/e7WoUhHfGKMsHeVbx6A0SA28NeCNPR 4ePOu47CMsTH/gZrA7lHX/XBJzAMocMIfrOAP+3SXyefO5jGQ1FJHL72ccMX8X7e4k7P cn1VmtWWSSz0nVPJC3xz+9bC9rW6j15DJ8/TQA12hIpTSjU4/4BzUl6JU6UHsyzZHvb7 xCug==
MIME-Version 1.0
In-Reply-To <CALGmxEJO6GK7644kP8idJwM1ZkvjhgVJqBzOgewXWdY=LMjF3A@mail.gmail.com>
References <CABGYGEwjwDXW+ETK+vMZKeGUfSWePymZ9+wfSCXzOhgCgsHoug@mail.gmail.com> <1B26E03E-9503-49F6-9D12-EDE83E001E6B@mac.com> <CABGYGEwcqf8s4LH9CfD0e15VCqbd0YH64Wub=o6hZ3Eq=Kqu5A@mail.gmail.com> <CALGmxEJO6GK7644kP8idJwM1ZkvjhgVJqBzOgewXWdY=LMjF3A@mail.gmail.com>
Date Thu, 2 Aug 2012 12:15:20 +1000
Subject Re: [Pythonmac-SIG] Py2app error
From Mark Livingstone <livingstonemark@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2851.1343873723.4697.python-list@python.org> (permalink)
Lines 83
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343873723 news.xs4all.nl 6848 [2001:888:2000:d::a6]:33049
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26379

Show key headers only | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [Pythonmac-SIG] Py2app error Mark Livingstone <livingstonemark@gmail.com> - 2012-08-02 12:15 +1000

csiph-web