From: Thomas H. <th...@py...> - 2004-12-02 21:14:24
|
Eric Woudenberg <ea...@co...> writes: > Hi Folks, > > I'm not a heavy py2exe user, but have generally had good luck with > it. I'm having some trouble getting it to work under Python2.4 though. > > Here's what's happening: > > Clean everthing out: > $ rm -rf dist > > Check the version: > $ grep version /Python24/lib/site-packages/py2exe/__init__.py > __version__ = "0.5.4" > > Here's my setup.py: > $ cat set.py > > from distutils.core import setup > import py2exe > setup(console=['try.py']) > > Here's my Python app: > $ cat try.py > #!/python24/python > print 'hi' > > I run Py2exe: > > $ /python24/python set.py py2exe > running py2exe > creating C:\_dev\projects\tools\cip_app_conversion\dist > *** searching for required modules *** > *** parsing results *** > *** finding dlls needed *** > *** create binaries *** > *** byte compile python files *** > skipping byte-compilation of C:\python24\lib\UserDict.py to UserDict.pyc > skipping byte-compilation of C:\python24\lib\atexit.py to atexit.pyc > skipping byte-compilation of C:\python24\lib\copy.py to copy.pyc > skipping byte-compilation of C:\python24\lib\copy_reg.py to copy_reg.pyc > skipping byte-compilation of C:\python24\lib\linecache.py to linecache.pyc > skipping byte-compilation of C:\python24\lib\macpath.py to macpath.pyc > skipping byte-compilation of C:\python24\lib\ntpath.py to ntpath.pyc > skipping byte-compilation of C:\python24\lib\os.py to os.pyc > skipping byte-compilation of C:\python24\lib\os2emxpath.py to os2emxpath.pyc > skipping byte-compilation of C:\python24\lib\popen2.py to popen2.pyc > skipping byte-compilation of C:\python24\lib\posixpath.py to posixpath.pyc > skipping byte-compilation of C:\python24\lib\re.py to re.pyc > skipping byte-compilation of C:\python24\lib\repr.py to repr.pyc > skipping byte-compilation of C:\python24\lib\sre.py to sre.pyc > skipping byte-compilation of C:\python24\lib\sre_compile.py to sre_compile.pyc > skipping byte-compilation of C:\python24\lib\sre_constants.py to sre_constants.pyc > skipping byte-compilation of C:\python24\lib\sre_parse.py to sre_parse.pyc > skipping byte-compilation of C:\python24\lib\stat.py to stat.pyc > skipping byte-compilation of C:\python24\lib\string.py to string.pyc > skipping byte-compilation of C:\python24\lib\traceback.py to traceback.pyc > skipping byte-compilation of C:\python24\lib\types.py to types.pyc > skipping byte-compilation of C:\python24\lib\warnings.py to warnings.pyc > *** copy extensions *** > *** copy dlls *** > copying C:\python24\w9xpopen.exe -> C:\_dev\projects\tools\cip_app_conversion\dist > copying C:\WINDOWS\System32\python24.dll -> C:\_dev\projects\tools\cip_app_conversion\dist > setting sys.winver for 'C:\_dev\projects\tools\cip_app_conversion\dist\python24.dll' to 'py2exe' > copying C:\python24\lib\site-packages\py2exe\run.exe -> C:\_dev\projects\tools\cip_app_conversion\dist\try.exe > The above is the same what I get when I build your example. > Then try and run the executable: > $ dist/try.exe > hi > Traceback (most recent call last): > File "C:\python24\lib\site-packages\py2exe\boot_common.py", line 69, in ? > import linecache > zipimport.ZipImportError: can't find module 'linecache' Different for me: It prints 'hi', and then exits. Do the samples supplied with py2exe work for you (they are in the lib\site-packages\py2exe\samples folder)? Which windows version do you use? Do you use cygwin, or a bash-like shell, instead of the windows command prompt (cmd.exe or command.com)? Thomas |