iDevGames Forums
py2app woes - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: py2app woes (/thread-1951.html)

py2app woes - Wowbagger - Jan 6, 2009 05:33 PM

I've been trying to get py2app up and running so I can package a game I made with pygame recently. However, I've been having a lot of trouble with it. I tried installing version 0.4.2 from here (that's the latest version, right?), and upon running "python install", it spits out this error:

Searching for modulegraph>=0.7.2dev
No local packages or download links found for modulegraph>=0.7.2dev
error: Could not find suitable distribution for Requirement.parse('modulegraph>=0.7.2dev')

So then, I tried using py2app 0.3.6 (from, and while it was able to install successfully, I tried running it with a script, and it failed with this error:

File "build/bdist.macosx-10.3-fat/egg/macholib/", line 178, in load
    raise ValueError("Unknown load command: %d" % (cmd_load.cmd,))
ValueError: Unknown load command: 27

I'm not sure if py2app is outdated, not maintained, or if I'm messing up somewhere. If others have gotten py2app to work (especially with pygame apps), how should I go about this? Or are there other ways of packaging a Python game?

EDIT: Oh, and I should also note that the "installer" that the py2app site mentions doesn't exist apparently, so I've been building it from the source each time.

EDIT 2: I guess I should also mention that I'm running Python 2.5 on OS X 10.5.5 with pygame 1.8.1 installed.

py2app woes - stevejohnson - Jan 6, 2009 06:57 PM

Get easy_install and type "sudo easy_install -U py2app" into Terminal.

PyGame has its own py2app issues, though. You'll need to find a tutorial for it, or use the generator in py2app.

py2app woes - Wowbagger - Jan 6, 2009 10:27 PM

Thanks for the link -- that made my life much easier.

As for the pygame issues, I looked into it more, and apparently I needed an updated version of macholib ("macholib==dev") and pygame itself (the latest unstable release fixes the issue apparently).

Again, thanks for the help.