Jump to content
  • Advertisement
Sign in to follow this  
capo328

How do you install and use py2exe and pygame?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 setup
import 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 this post


Link to post
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" % msg
SystemExit: usage: py2exe [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: py2exe --help [cmd1 cmd2 ...]
or: py2exe --help-commands
or: py2exe cmd --help

error: no commands supplied

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!