py2exe 0.3.1 hangs trying to remove build under Win98SE

Thomas Heller theller at python.net
Wed Mar 20 04:43:04 EST 2002


"Doug Farrell" <writeson at earthlink.net> wrote in message news:88bc63c6.0203191142.1926b089 at posting.google.com...
> Hi all,
>
> I'm trying to package up a Python2.2 program that uses wxPython with
> the py2exe system and I'm having no luck. I open up a DOS window (I'm
> running Win98SE) and run the following command line:
>
> python pyexe.py myscript.py
>
> The pyexe.py setup script is something I got from ASPN that is a
> generalized setup script for this purpose, I've listed it below:
>
> from distutils.core import setup
> import sys, os, py2exe
>
> name = sys.argv[1]
> sys.argv[1] = 'py2exe'
>
> sys.path.append(os.path.dirname(os.path.abspath(name)))
>
> setup(name=name[:-3], scripts=[name])
>
>
> At the end of processing, I get the message:
> removing 'build\bdist.win32\winexe' (and everything under it)
>
> At this point the DOS window hangs and never returns. In fact I have
> trouble killing it with the Task Manager. In addition, at this point
> Windows Explorer no longer runs, it comes up, but the window frame is
> empty. I have to reboot my machine to get full control back.
>

Doug, I cannot reproduce this (at least with a trivial script under Win98SE).
One thing I noted when I tried this: the build script cannot have the
name 'py2exe.py', because in this case 'import py2exe' imports your
compile script! You should rename it to something like 'compile.py',
and be sure to delete any py2exe.pyc or py2exe.pyo which may have been
created. I think this was mentioned in the ASPN recipe.

> The script does create the dist directory where I expect it and there
> is a myscript.exe and accompanying DLL's and such there. But if I try
> to run that program, a DOS window comes up with various tracebacks in
> it about not being able to import various modules. The myscript.py
> file runs fine in the interpreter. Anyone have any idea what's going
> on here? I'm runnig py2exe version 0.3.1, so I have the latest.
>
Depending on the modules your script uses, py2exe may have problems
finding them. You should specify them to be included with the --includes
or --packages flag.

Thomas





More information about the Python-list mailing list