I wrote a very simple program named test.py which looks like this:
print 'hello world'
then I wrote a setup program called setup.py which looks like this:
from distutils.core import setup
import py2exe
setup(console=['test.py'])
They are both in the same folder so it should work. When I run the setup.py it gives me error messages that look like this:
C:\Python26\lib\sets.py:85: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
stacklevel=2)
Traceback (most recent call last):
File "C:\Users\python2.6\Desktop\program\pygametests\setup.py", line 5, in <module>
setup(console=['test.py'])
File "C:\Python26\lib\distutils\core.py", line 140, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
I am running windows vista.
you should go to the folder where you have your files and run:
or directly
the traceback is telling you you are not sending any command (‘py2exe’ in my example) for setup.py in the command line
You can see available commands with: