[Pythonmac-SIG] Py2app Question...
Bob Ippolito
bob at redivi.com
Tue Aug 9 20:44:57 CEST 2005
On Aug 9, 2005, at 5:46 AM, Schollnick, Benjamin wrote:
> Bob,
>
> I just upgraded my development machine to Tiger... And something
> weird is happening...
>
> The application is working fine from the command line, using
> pythonw.... But if I py2app it....
>
> I am using the Stock v2.3.5 of Python, and have installed
> TigerFix...
>
> ---mac_build.py----
> from distutils.core import setup
> import py2app
>
> py2app_options = { 'argv_emulation':True,
> 'optimize':2,
> 'compressed':1}
>
> data_files = [ ("", ["AUDIT.INI",
> "AUDIT_GUI.RSRC.PY",
> "sample_audit.ini",
> "clean_desk.rpt",
> "software.rpt"])
> ]
>
> setup ( app=['audit_gui.py'],
> options={"py2app": dict(py2app_options)},
> data_files= data_files )
> -----------------
>
> I get the following console exception...
>
> Traceback (most recent call last):
> File "/Users/benjamin/Desktop/Auditor Source
> (Mac)/dist/audit_gui.app/Contents/Resources/__boot__.py", line 42,
> in ?
> _run('audit_gui.py')
> File "/Users/benjamin/Desktop/Auditor Source
> (Mac)/dist/audit_gui.app/Contents/Resources/__boot__.py", line 39, in
> _run
> execfile(path, globals(), globals())
> File "/Users/benjamin/Desktop/Auditor Source
> (Mac)/dist/audit_gui.app/Contents/Resources/audit_gui.py", line 81,
> in ?
> from PythonCard import model
> File "PythonCard/model.pyo", line 24, in ?
> ImportError: No module named wxPython.wx
> 2005-08-09 11:41:19.910 audit_gui[743] audit_gui Error
> 2005-08-09 11:41:19.910 audit_gui[743] An unexpected error has
> occurred
> during execution of the main script
>
> ImportError: No module named wxPython.wx
>
> See the Console for a detailed traceback.
>
> wxPython appears to be working fine.... And so is pythoncard.... At
> least from the command line.... So I am not positive where to start
> looking....
>
> Any suggestions?
Add 'site_packages': True to your options and see if that helps.
You're trying to use modules from site-packages (wxPython), which
py2app does not do by default on Tiger because it only knows how to
include modules from site-packages, and in Tiger the default wxPython
is in a System directory so there is another stronger rule that
excludes them.
Or, upgrade to 2.4.1.
-bob
More information about the Pythonmac-SIG
mailing list