简体   繁体   中英

PyGame in a virtualenv on OS X with brew?

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM