Best way to install pygame on OS X Lion?

前端 未结 5 1671
执笔经年
执笔经年 2020-12-17 14:52

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/wik

相关标签:
5条回答
  • 2020-12-17 15:25

    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
    0 讨论(0)
  • 2020-12-17 15:29

    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)

    0 讨论(0)
  • 2020-12-17 15:30

    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

    0 讨论(0)
  • 2020-12-17 15:37

    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

    0 讨论(0)
  • 2020-12-17 15:47

    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
    
    0 讨论(0)
提交回复
热议问题