- Python 2.5.1 - from the Python download page.
- PIL 1.16 - Python Image Library.
- NumPy 22.214.171.124.
- Numeric 24.2.
- numarray 1.5.2.
- PyObjC 1.4.
- wxPython 126.96.36.199 (just in case)
Finally, I grabbed the Pygame 1.7.1 source from pygame.org/download.shtml.
Installation for most of the prerequisite packages went smoothly, since they all include OS X Installers. While pygame requires Numeric, I went ahead and installed NumPy and numarray, just in case.
The only real problem came when installing PyObjC. After installing, I opened a python interpreter to test it out by typing "import Foundation" (as it says to do in the PyObjC Tutorial. This let to the following error:
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /sw/lib/libJPEG.dylib
Apparently, if you've installed anything using Fink, the PyObjC installer gets confused when trying to choose to which libraries to link. For me, libjpeg was the culprit... hence the error above. To make sure PyObjC works with Apple's ImageIO, I edited my ~/.profile and commented out any lines that set a DYLD_LIBRARY_PATH environment variable (just place a # in front of the line). For me, this looked like this:
This prevents any conflicts when linking against libraries installed by fink (which are stored in /sw) and possibly duplicate system libraries. After doing this, I re-ran the PyObjC installer, and everything worked perfectly. Now, I built the Pygame source, and my simple Pygame applications will run.
So what's next? Notice there's no mention of PyOpenGL above, so any Pygame applications that use PyOpenGL won't work Until you Install PyOpenGL
Download this Pygame Package: http://bradmontgomery.net/files/pygame-1.7.1release-py2.5.1-macosx10.4.dmg comments powered by Disqus