Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyGame in a virtualenv on OS X with brew?

Tags:

Can't quite figure out how to install PyGame in a virtualenv on OSX Lion. I'd really like to keep things contained in the virtualenv, if at all possible.

I've tried downloading the source for PyGame and running the included setup.py in the virtualenv, but it seems to be having a bunch of issues finding the SDL requirements even after installing those via Homebrew.

Any tips from someone that's set this up?

like image 599
notanumber Avatar asked Dec 10 '11 18:12

notanumber


1 Answers

Yes, you can use it in 3 steps with brew:

brew install python brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi  /usr/local/share/python/pip install hg+http://bitbucket.org/pygame/pygame 

(this is how i did it, it's working perfectly.)

If you don't know brew, start here

like image 79
tito Avatar answered Nov 20 '22 12:11

tito