freeze, wxPython, and OSX

Brian Victor bhv1 at psu.edu
Wed Jan 29 11:21:10 EST 2003


I would like to be able to freeze a wxPython program so that it can run
on another box without having to install the entire python suite of
files.  The rest of my post assumes this is possible. ;)

I compiled (in this order) wxMac 2.4.0, Python 2.2, and wxPython
2.4.0.2.  I added --with-opengl to wxMac, but the configure lines were
otherwise bare.  All three "make install"ed without complaint.  I'm
using the December 2002 Developer Tools on OSX 10.2.3.

Used freeze.py to try to freeze a simple "hello world" program.
macfreeze.py didn't work at all, and it seems to be a CodeWarrior only
thing.  I tried a "make" and got an error about libpython2.2.a not being
in
/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/config.
So I put it there.  Ranlib complained, so I reran it.  Finally it
linked.  But running it shows the following:

Traceback (most recent call last):
  File "/Users/bhv1/Desktop/helloworld.py", line 1, in ?
    from wxPython.wx import *
  File
"/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site-packages/wxPython/__init__.py",
line 20, in ?
    import wxc
ImportError: No module named wxc

Which isn't surprising, considering that freeze reported this:

generating table of frozen modules
Warning: unknown modules remain: MacOS _Ctl _Dlg _Evt _Menu _Qd _Res
_Win _locale _socket binascii cStringIO errno icglue macfs math pcre pwd
select strop struct termios time wxPython.wxc

Is there a way to do what I want it to do?  I imagine that even if I get
past this, I'll need to find a way to properly Rez the resulting binary
so that the compiled application shows up properly.

Thanks in advance for any insight.

-- 
Brian




More information about the Python-list mailing list