Installing pygame on Snow Leopard's system Python 2.6

7,819

Solution 1

Have you tried installing it using easy_install or pip?

I haven't tried it yet, but I know I was about to install the needed libraries (SDL_game, etc) via port, then install pygame with

sudo easy_install pygame

Solution 2

Pretty important to get the latest SDL_image.framework if you want actual PNG/JPEG support:

http://www.libsdl.org/projects/SDL_image/

Otherwise it will only load Windows BMP files as you will see this during the build:

/Library/Frameworks//SDL_image.framework/SDL_image, missing required architecture x86_64 in file

Share:
7,819
mk12
Author by

mk12

Updated on September 17, 2022

Comments

  • mk12
    mk12 over 1 year

    Snow leopard has python 2.6 included now, and I want to install pygame on it, but it says its for Python from python.org, not system python. I tried using setup.py from source, but it didn't work. Is there some way I can install pygame on the system Python 2.6? I don't want to have two installations of python of the same version. Thanks.

    Hmm... I found this under the Mac OS X Binaries heading in install.html in the pygame source download folder:

    If you want to use the Apple system python, you will need to compile from source at this time - since most people prefer to leave the system python alone, and use the python downloaded from python.org. See http://pygame.org/wiki/MacCompile for current instructions for compiling from source on Mac OSX.

    • Admin
      Admin over 14 years
      I've never been able to install it on Leopard so I'm interested in the answer to this question.
    • Admin
      Admin over 14 years
      Do you have the dev tools installed? I've never had luck installed 3rd party libs into the /Library or /System/Library without the dev tools installed beforehand.
    • Admin
      Admin over 14 years
      I have the dev tools and succed in installing other libraries, but I never was able to install pygame.
  • Admin
    Admin almost 13 years
    The pyGame website now has a package installer for Snow Leopard: pygame.org/download.shtml
  • Jeff
    Jeff over 12 years
    This works for me-- the Pygame binary won't let you, and compiling from source gave me an error about gcc not found. You may have to hunt down some dependencies to get all the features working though-- such as the SDL framework. Pay attention to the Pygame log when it installs, then when you hunt down the dependencies, reinstall from easy_install