Freeze Question
Skip Montanaro
skip at pobox.com
Mon Aug 4 14:39:07 EDT 2003
David> 'import site' failed; use -v for traceback
David> Traceback (most recent call last):
David> File "vnmrXserver.py", line 1, in ?
David> File "/usr/local/lib/python2.2/SocketServer.py", line 131, in ?
David> File "/usr/local/lib/python2.2/socket.py", line 41, in ?
David> ImportError: No module named _socket
Is this during the freeze operation or while running the frozen app?
Can you successfully execute
import _socket
from the Python interpreter prompt? _socket.so should live in
${prefix}/lib/python2.3/lib-dynload
David> So I guess I this means I have to rebuild python with static
David> linking (this is a mystery to me) OR is there a way to hack the
David> makefile (or perhaps some other file) and have the missing
David> modules found and included in the frozen program without a
David> rebuild of python?
You can fairly easily (though a bit tediously) build a static Python
interpreter. You need to edit Modules/Setup to uncomment the various
extension modules you need. This is what we all used to do before Greg Ward
began attempting world domination through distutils. There should be some
documentation somewhere still about how to do this, perhaps in the
introductory comments in Modules/Setup itself. Yeah, looks like it's there.
I don't know about the second half of your question, as I'm not a freeze
user. Two suggestions come to mind:
1. Try Gordon MacMillan's installer instead of freeze. (Dunno if it
works on Solaris.)
2. Use Sun's package manager to distribute your application along with
Python instead. Having done this recently for a non-Python app, I
can tell you this isn't fun, but it should be possible.
Skip
More information about the Python-list
mailing list