From: Eric W. <ea...@co...> - 2004-12-02 22:38:01
|
Thank you Thomas! I ran the samples, which worked fine, and that helped me find out what was wrong. The problem was that I never removed the "build" directory after doing a build with python23. All the byte-compiling for the python24 build then ends up getting skipped but the .pyc files are for the wrong version (hence their failure to load). Just removing the build directory fixed it. Thanks kindly, Eric Thomas Heller writes: >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.p >yc >> 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.p >yc >> 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_compi >le.pyc >> skipping byte-compilation of C:\python24\lib\sre_constants.py to sre_con >stants.pyc >> skipping byte-compilation of C:\python24\lib\sre_parse.py to sre_parse.p >yc >> 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.p >yc >> 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_conve >rsion\dist >> copying C:\WINDOWS\System32\python24.dll -> C:\_dev\projects\tools\cip_a >pp_conversion\dist >> setting sys.winver for 'C:\_dev\projects\tools\cip_app_conversion\dist\p >ython24.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, i >n ? >> 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 > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://productguide.itmanagersjournal.com/ >_______________________________________________ >Py2exe-users mailing list >Py2...@li... >https://lists.sourceforge.net/lists/listinfo/py2exe-users |