Py2exe beginner troubles

Fabrizio facelle at jumpy.it
Wed Sep 26 14:12:03 EDT 2001


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 ?

Any help will be appreciated.

Thanks in advance,

Fabrizio

-----------------------------------------------------------------

Here are the details:

I use :

Python 2.0 installed in C:\Python20
Windows98
py2exe-0.2.6.win32-py2.0.exe installed in C:\Python20\py2exe

-------------

This is the program I am trying to "compile" :


def fact (x):
    f=1
    for t in range (1, x+1):
        f=f*t
    print f

z = input("Input a number ")
fact (z)

-----------------


And this is my setup script :

from distutils.core import setup
import py2exe
setup(name="fact",
               scripts=["fact.py"],
         )

----------------

I run it using :

c:\python20\python setup.py py2exe -W






More information about the Python-list mailing list