I'm trying to "freeze" my wxPython application using "freeze.py" from
python toolkit. Everyting goes right, the program is compiled, but fails
with error when launched:
$ ./my_app
Traceback (most recent call last):
File "my_app.py", line 21, in ?
from wxPython.wx import *
File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 21, in ?
import wxPython.wxc
ImportError: No module named wxc
/usr/lib/python2.2/site-packages/wxPython/__init__.py contains this line:
import wxc
This is good until we're in /usr/lib/python2.2/site-packages/wxPython/, but
python fails with this out there:
import wxc
# import error...
but not with this:
import wxPython.wxc
But... I tried to change "import wxc" with "import wxPython.wxc" in
/usr/lib/python2.2/site-packages/wxPython/__init__.py, but this didn't
helped when launching compiled python code.
Has anyone succeeded in running freezed wxPython applications?
I've copied this error after changing __init__.py, the originial should be:
[...]
File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 21, in ?
import wxc
ImportError: No module named wxc
Martynas Jocius
···
On Wed, Jul 02, 2003 at 03:48:27PM +0200, Martynas Jocius wrote:
$ ./my_app
Traceback (most recent call last):
File "my_app.py", line 21, in ?
from wxPython.wx import *
File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 21, in ?
import wxPython.wxc
ImportError: No module named wxc
I'm trying to "freeze" my wxPython application using "freeze.py" from
python toolkit. Everyting goes right, the program is compiled, but fails
with error when launched:
Supporting this, I should say that I've never had any problems at all with
py2exe which I consider a bit easier to use than McMillan
Raul
···
----- Original Message -----
From: "David C. Fox" <davidcfox@post.harvard.edu>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, July 02, 2003 8:11 AM
Subject: Re: [wxPython-users] Is it possible to freeze wxPython application?
Martynas Jocius wrote:
> Hello,
>
> I'm trying to "freeze" my wxPython application using "freeze.py" from
> python toolkit. Everyting goes right, the program is compiled, but fails
> with error when launched:
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
I'm trying to "freeze" my wxPython application using "freeze.py" from
python toolkit. Everyting goes right, the program is compiled, but fails
with error when launched:
$ ./my_app
Traceback (most recent call last):
File "my_app.py", line 21, in ?
from wxPython.wx import *
File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 21, in ?
import wxPython.wxc
ImportError: No module named wxc
/usr/lib/python2.2/site-packages/wxPython/__init__.py contains this line:
import wxc
It's been a long time since I tried doing anything with freeze, but here is a shot in the dark: Do you copy the wxc.so file to the directory where your app is located?
This is good until we're in /usr/lib/python2.2/site-packages/wxPython/, but
python fails with this out there:
import wxc
# import error...
but not with this:
import wxPython.wxc
This probably means that the wxc.so is being found by looking on the default sys.path like normal unfrozen apps. IIRC, moving it to where your app is located will allow it to be found without qualifiying the name with the package, since it will be relative to the frozen wxPython/wx.py (embedded in your app) just like it would be in the unfrozen situation.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I decided to make standalone binary for win32 platform with py2exe (it did
all the work successfully) and leave linux version as is (run using
interpreter). Thanks for advices.
Martynas Jocius
···
On Wed, Jul 02, 2003 at 05:34:37PM +0200, Thomas Heller wrote:
As the author of py2exe, I appreciate that. But it seems the OP wants
to target Linux (or Unix?), so py2exe isn't possible.
I have frozen wxPython applications successfully on Linux (and Windows)
using cx_Freeze. I believe it is fairly straightforward to use but I
wrote it so I can't be said to be a fair evaluator... You can take a
look, though, at
···
On Thu, 2003-07-03 at 03:25, Martynas Jocius wrote:
This message uses a character set that is not supported by the Internet
Service. To view the original message content, open the attached
message. If the text doesn't display correctly, save the attachment to
disk, and then open it using a viewer that can display the original
character set. <<message.txt>>
--
Anthony Tuininga
anthony@computronix.com
Computronix
Distinctive Software. Real People.
Suite 200, 10216 - 124 Street NW
Edmonton, AB, Canada T5N 4A3
Phone: (780) 454-3700
Fax: (780) 454-3838