Differences between revisions 11 and 14 (spanning 3 versions)
Revision 11 as of 2007-01-17 19:34:56
Size: 2721
Comment:
Revision 14 as of 2008-07-08 11:27:44
Size: 2756
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 my program runs fine, and it compiles fine, but when I run the compiled executable it crashes with:
 

 .
my program runs fine, and it compiles fine, but when I run the compiled executable it crashes with:
Line 23: Line 23:
 
Line 25: Line 24:
 wxPython program I try. I've heard of people successfully py2exe'ing wxPython programs before so I wonder if doing something wrong. This is my setup.py:
Line 27: Line 25:
 . wxPython program I try. I've heard of people successfully py2exe'ing wxPython programs before so I wonder if doing something wrong. This is my setup.py:
Line 31: Line 30:
Line 34: Line 32:
Anyone have any ideas whats wrong? options={"py2exe": {"includes": "wxPython.wx}} and options={"py2exe": {"package": "wx"}} and windows=[[wxfoo.py]] return the same results.
Line 35: Line 34:
Anyone have any ideas whats wrong? options={"py2exe": {"includes": "wxPython.wx}} and options={"py2exe": {"package": "wx"}} and windows=["wxfoo.py"] return the same results.
 ''-jc''
 . ''-jc''
I'm having a similar problem in WinXP. Boa Constructor doesn't work with wxPython2.5(it needs 2.4.2.4) but the version of AccessGrid I'm running requires wxPython2.5. I fould that if I just copy the wx and wxPython directories for wxPython2.5 somewhere for safe keeping, then copy in the wx and wxPython directories for wxPython2.4.2.4 Boa will run once. Then on successive attempts, I get the "NameError: name 'wxObjectPtr' is not defined" message from fonts.py. I did have a build directory in the wxPython directory and got rid of that, but even now that the build directory is gone, I'm still getting the same problem. Perhaps there's more to this story? -myk-
Line 38: Line 37:
'''FIX:''' Add the missing DLL to the system folder.
Line 39: Line 39:
I'm having a similar problem in WinXP. Boa Constructor doesn't work with wxPython2.5(it needs 2.4.2.4) but the version of AccessGrid I'm running requires wxPython2.5. I fould that if I just copy the wx and wxPython directories for wxPython2.5 somewhere for safe keeping, then copy in the wx and wxPython directories for wxPython2.4.2.4 Boa will run once. Then on successive attempts, I get the "NameError: name 'wxObjectPtr' is not defined" message from fonts.py. I did have a build directory in the wxPython directory and got rid of that, but even now that the build directory is gone, I'm still getting the same problem. Perhaps there's more to this story?
-myk-
When you package a wx application with py2exe, and the .exe file does not tun successfully, simply copy the missing dll into your system folder. (In WinXP it is often C:\WINDOWS\system32)
Line 42: Line 41:
= Problem in packaging wx applications with py2exe. = We hope that this bug will be fixed at the next py2exe release.
Line 44: Line 43:
I have created a minimal wx application, which runs fine. However, when I package it with py2exe and I try to run the .exe file, an error occurs, the program crashes (before even starting) and a pop-up box says to look at the log file for the error trace. It says that wx/_core_.pyd failed to be loaded (this file exists in my filesystem - I have checked). When I skip "--bundle-files 1" in command line arguments, another pop-up box also appears, and says that a DLL failed to be loaded.

Any ideas? Solution? Fixes?
Note that if you are using the wxversion module in your program to select which version of wx to use, you may need to make modifications to your code for bundling the application with py2exe. See the wxversion documentation for more details: http://www.wxpython.org/docs/api/wxversion-module.html ~JMH

FIX: Delete the build directory. Simple fix for an obscure and complicated problem...

BTW: That Fix also helps with very very obscure DLL-Not-Found-Problems when updating wxPython - HAM2004-08-30

I'm having some trouble using Python (2.3.4) with py2exe (0.5.0) and wxPython (2.4.2.4). Without py2exe

  • my program runs fine, and it compiles fine, but when I run the compiled executable it crashes with:

Traceback (most recent call last):
File "wxfoo.py", line 10, in ?
from wxPython.wx import *
File "wxPython\wx.pyc", line 4, in ?
File "wxPython\misc.pyc", line 15, in ?
File "wxPython\wx.pyc", line 6, in ?
File "wxPython\misc2.pyc", line 4, in ?
File "wxPython\windows.pyc", line 15, in ?
File "wxPython\wx.pyc", line 10, in ?
File "wxPython\gdi.pyc", line 15, in ?
File "wxPython\wx.pyc", line 12, in ?
File "wxPython\fonts.pyc", line 120, in ?
NameError: name 'wxObjectPtr' is not defined

All wxfoo.py contains is "from wxPython.wx import *" and this happens with every

  • wxPython program I try. I've heard of people successfully py2exe'ing wxPython programs before so I wonder if doing something wrong. This is my setup.py:

   1 from distutils.core import setup
   2 import py2exe
   3 setup(console=["wxfoo.py"])

Anyone have any ideas whats wrong? options={"py2exe": {"includes": "wxPython.wx}} and options={"py2exe": {"package": "wx"}} and windows=wxfoo.py return the same results.

  • -jc

I'm having a similar problem in WinXP. Boa Constructor doesn't work with wxPython2.5(it needs 2.4.2.4) but the version of AccessGrid I'm running requires wxPython2.5. I fould that if I just copy the wx and wxPython directories for wxPython2.5 somewhere for safe keeping, then copy in the wx and wxPython directories for wxPython2.4.2.4 Boa will run once. Then on successive attempts, I get the "NameError: name 'wxObjectPtr' is not defined" message from fonts.py. I did have a build directory in the wxPython directory and got rid of that, but even now that the build directory is gone, I'm still getting the same problem. Perhaps there's more to this story? -myk-

FIX: Add the missing DLL to the system folder.

When you package a wx application with py2exe, and the .exe file does not tun successfully, simply copy the missing dll into your system folder. (In WinXP it is often C:\WINDOWS\system32)

We hope that this bug will be fixed at the next py2exe release.

Note that if you are using the wxversion module in your program to select which version of wx to use, you may need to make modifications to your code for bundling the application with py2exe. See the wxversion documentation for more details: http://www.wxpython.org/docs/api/wxversion-module.html ~JMH

Py2exeAndwxPython (last edited 2008-07-08 11:27:44 by localhost)