16

I tried to install pygame via pip but this fails. Based on my google searches, it sounds like easy_install also fails.

I also checked out: http://www.pygame.org/wiki/MacLionCompile but the solution is incomplete.

I'm running python 2.7.1 bundled with Lion.

Suggestions? Appreciate the help.

timepilot
  • 749
  • 2
  • 11
  • 20

5 Answers5

12

You could try the binary package for Lion, available on the pygame website.

It worked for me (OSX 10.7.1 with bundled Python 2.7.1)

Marlon
  • 186
  • 8
8

See the answer from this question: PyGame in a virtualenv on OS X with brew?

Essentially, the PyGame in PyPy hasn't been updated for a while. The version in the repository has updated build scripts that handle Pythonbrew, virtualenv and other utilities.

The pip command to use is:

pip install hg+http://bitbucket.org/pygame/pygame
Community
  • 1
  • 1
Rebs
  • 4,169
  • 2
  • 30
  • 34
  • 1
    You need to install mercurial either via apt-get, brew, etc, or via pip (its a python application). – Rebs Jul 18 '14 at 01:09
7

Just for the sake of anyone that googles this question, my lab has a wiki set up with instructions for installing Pygame with just about any configuration:

http://smash.psych.nyu.edu/labwiki/PyGameSetup

John McDonnell
  • 1,470
  • 2
  • 18
  • 19
6

I had good luck with macports:

  1. Install macports if you don't already have it: http://www.macports.org/
  2. Install python via macports: sudo port install python26. I typed in the command it said at the end to set it as my default python installation. If you don't, then in step 4 you'll have to run the app a different way.
  3. Install pygame: sudo port install py26-game
  4. Run your pygame app: python main.py
thedayturns
  • 9,723
  • 5
  • 33
  • 41
  • I second this approach. See my comment under http://stackoverflow.com/a/15707206/2596664 . (I'm popping my stack of answers in my browser and tying them together to pay it forward.) – Jim L. Jul 27 '13 at 17:51
0

I have been looking for this for myself and I stumbled upon this build that happens to work. I am using OSX 10.8.3 and python 2.7.

http://inside.catlin.edu/moodle/mod/resource/view.php?id=16736