Public Group

How do you install and use py2exe and pygame?

This topic is 4527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I tried following the instructions but just couldn't understand. I'd appreciate it if anyone can tell me how in clear, concise instructions.

Share on other sites
Yeah I used to use Python and I never figured out how to work anything with Pygame.
If somebody could answer this I'd appreciate it.

Share on other sites
I could never get it to work as intended, however, this does work by itself, if everything is installed. :-D

Quote:
 from distutils.core import setupimport py2exe#setup(name='EXE_NAME.exe',description='',version='0.0.1',scripts=['SOURCE.py'],data_files=[])setup(name='NAME', windows=["SOURCE.py"])

EXE_NAME is the name of the exe you want.
SOURCE is the script you want to run.
NAME is the name of ths program you want in the titlebar.

Share on other sites
I got this error when running that program you typed.

Traceback (most recent call last):  File "C:\Python24\py2exe", line 6, in -toplevel-    windows=["C:\Python24\hello_world"])  File "C:\PYTHON24\lib\distutils\core.py", line 137, in setup    raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msgSystemExit: usage: py2exe [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]   or: py2exe --help [cmd1 cmd2 ...]   or: py2exe --help-commands   or: py2exe cmd --helperror: no commands supplied

Share on other sites
I think the error message is clear:

error: no commands supplied

You need to pass parameters on the command line to tell the script what to do.

For example, py2exe bdist_wininst would build the program and package it in a windows installer (assuming it works like other distutils scripts).

Follow the instructions (py2exe --help or py2exe --help-commands)

[Edited by - Fruny on January 3, 2006 1:28:27 PM]

• 10
• 17
• 9
• 13
• 41