Py2exe beginner troubles

Thomas Heller thomas.heller at
Wed Sep 26 20:55:18 CEST 2001

"Fabrizio" <facelle at> wrote in message news:9ot7pg$ci1$1 at
> Hi,
> I am trying to use Py2exe to build a standalone executable of a very basic
> program (see below), but with no luck.
> This is what I get:
> error: invalid command 'py2exe' (no module named 'distutils.command.py2exe')
> What am I doing wrong ?
The common mistake which leads to this problem is to
have your scripts in the python\py2exe directory.

Move your script and your file somewhere else,
and it will work.

py2exe is a package containing a module named py2exe,
and executing 'import py2exe' in the package directory
will pick up the module instead of the package.
I think i will have to rename the module to something else...


More information about the Python-list mailing list