Search code examples
pythonmacospython-2.7pygameenthought

Installing pygame with enthought canopy on Mac


I'm trying to install pygame in my enthought canopy python distribution. I'm using the latest version of canopy for 64-bit Mac (Python 2.7.6), and I'm using Mavericks OS. I know that installing pygame should be possible since I managed to get pygame working with the official python 2.7.6 from the python website using the binary installation file available here.

The first thing I tried was ensuring that canopy was my default python, and the installation file linked above, but this just re-installed pygame into the official python distribution.

Next I tried pip, which I've used to install other packages successfully (e.g., spyder). The following is what happens when I try pip install pygame:

Downloading/unpacking pygame

Downloading pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip (7.4Mb): 7.4Mb

downloaded

Running setup.py egg_info for package pygame

Traceback (most recent call last):
  File "<string>", line 14, in <module>

IOError: [Errno 2] No such file or directory: '/Users/Sam/build/pygame/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 14, in <module>

IOError: [Errno 2] No such file or directory: '/Users/Sam/build/pygame/setup.py'

This is different to the error reported here, so I'm not sure at all what's going on. Any suggestions?


Solution

  • I think I found a solution: I simply used pip to install pygame from a specific location, using sudo pip install hg+http://bitbucket.org/pygame/pygame. Unlcear why this worked, however.