[wxPython-users] wxPython 2.7+, py2exe, -b1 or -b2
Jürgen Kareta
python at kareta.de
Mon Nov 20 11:02:31 PST 2006
Josiah Carlson schrieb:
>For some reason I seem to have been unsubscribed from the list on the
>15th...
>
>In any case, I've noticed an interesting bug when trying to combine
>wxPython 2.7(.1.2) and py2exe. When using py2exe (version 0.6.4 and
>0.6.5), Python 2.4 or 2.5, and wxPython 2.7(.1.2) along with the -b1 or
>-b2 options to py2exe (which puts all but pythonXY.dll inside the
>included library.zip without and with compression, respectively) (also
>note that one needs to disable the including of zlib.pyd in Python 2.5
>as per this bug: http://python.org/sf/1513850 ), running the output
>produces a traceback:
>
>Traceback (most recent call last):
> File "gui.py", line 2, in ?
> import wxversion;wxversion.ensureMinimal('2.7')
> File "wxversion.pyc", line 206, in ensureMinimal
> File "zipextimporter.pyc", line 78, in load_module
> File "wx\__init__.pyc", line 44, in ?
> File "zipextimporter.pyc", line 78, in load_module
> File "wx\_core.pyc", line 4, in ?
> File "zipextimporter.pyc", line 91, in load_module
>ImportError: MemoryLoadLibrary failed loading wx\_core_.pyd
>
>
>Checking the content of the included library.zip shows me that
>_core_.pyd is included, so it's not just a missing file. Not including
>any -b option produces a binary that runs fine (but is significantly
>larger, something I'm trying to avoid). Removing the wxversion call and
>running it in a Python installation with only wxPython 2.6 or 2.7
>produces the same results.
>
>Using wxPython 2.6.3.3 and Python 2.4 produces a working binary (no
>traceback), as does wxPython 2.6.3.0 and Python 2.3 .
>
>It seems to be an issue with wxPython 2.6 vs 2.7.
>
>
>To reproduce the issue, save the attached setup.py and gui.py into the
>same path, then run the following (running the output gui.exe after each
>one):
>
>python setup.py py2exe
>python setup.py py2exe -b1
>python setup.py py2exe -b2
>
>If you have patched Python 2.5's py2exe, or if you are using Python 2.4,
>wxPython 2.6 will produce a working application (remember to change the
>wxversion.ensureMinimal call), but wxPython 2.7 will produce a broken
>application... at least on my machine.
>
>Can anyone else verify?
>
> - Josiah
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
>For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
Hi Josiah,
that's a known problem of py2exe and not wxpython related. See Thomas
Hellers answer to my problem:
http://article.gmane.org/gmane.comp.python.py2exe/1859
Jimmy Retzlaff the maintainer of py2exe will soon provide a new version
as he anounced in the py2exe ml.
Jürgen
More information about the wxpython-users
mailing list