How can I make .exe from .py file with py2exe on Python2.2.3 (WinXP)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • P3NG3R
    New Member
    • Jun 2012
    • 1

    How can I make .exe from .py file with py2exe on Python2.2.3 (WinXP)

    Hi!

    Python v2.2.3
    Py2Exe v0.3.1.win32-py2.2

    I have a little problem with making of .exe file from .py file.

    I tried this discreption: http://www.py2exe.org/index.cgi/Tutorial#Step1
    but not work for me.

    I wrote one example setup.py file, and hello.py.
    hello.py:
    Code:
    print 'Hello word - Test executable python file'
    x = 0
    while x != 10:
    	x += 1
    	print str(x)+',',
    	if x == 10:
    		print '\nThe program is finished'
    setup.py:
    Code:
    from distutils.core import setup
    import py2exe
    setup(console=['helllo.py'])
    I opened cmd in the C:\Python22\ folder and I runned this script:
    Code:
    python setup.py py2exe
    And I got the warn message;
    Code:
    c:\Python22\lib\distutils\dist.py:215: UserWarning: Unknown distribution option:
     'console'
     warnings.warn(msg)
    running py2exe
    Traceback (most recent call last):
      File "setup.py", line 4, in ?
        setup(soncole=['hello.py'])
      File "C:\Python22\lib\distutils\core.py", line 138, in setup
        dist.run_commands()
      File "C:\Python22\lib\distutils\dist.py", line 138, in run_commands
        self.run_commands(cmd)
      File "C:\Python22\lib\distutils\dist.py", line 138, in run_command
        cmd_obj.run()
      File "C:\Python22\Lib\site-packages\py2exe\build_exe.py", line 254, in run
        raise "Error", "Nothing to do"
    Error: Nothing to do
    images:
    The script.
    The warning.

    So, what can I do to work for me?

    Sorry for my bad english.
Working...