Python Forum

Full Version: How to begin coding for game making [Install pygame on mac]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am using Python 3.6 and tried putting Pygame on my MacBook Pro but could not do it. 

Is there a way to do this that is as simple as downloading?

I was trying to follow directions to use my Terminal to install it but that didn't go well. 

Can it be done on all computers by using the Terminal?
If so - can I get help for that process on this Forum?

Thanks. 

Matt
Not a lot of people own macs here. Pygame has been known to be a pain in the ass to work with macs. And its usually not as simple as apt-get install python-pygame like it is in linux.

I remember with El Captain that it required a downgrade of SDL_image from 1.2.12 -> 1.2.10 but that was a year ago...not sure if that problem was fixed or not. 

You can also try this mac python install tutorial
http://kidscancode.org/blog/2015/09/pygame_install/

based off of devs

Quote:
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi 
sudo pip install hg+http://bitbucket.org/pygame/pygame
Hi!
I've gotten myself back into both mac and python development, and have just installed python and pygame on El Capitan.
I'm actually positively shocked how painless the whole process was!

It's as simple as:

1) install official python from python.org. I installed the latest 3.6.0. You can safely disregard the already installed mac python 2.7
2) open the terminal and type "pip3 install pygame". It should download and install the latest pygame 1.9.3.

And... thats it!
I've tested it, it does report some sort of deprecated audio library warning, but it works. Both png and jpg images load just fine.

Just make sure to include the "3" whenever you call python from the terminal. E.g. it's "python3 mygame.py"and "pip3 install something". Without it, you're calling the included version of python 2.7.
Kudos to people who worked on pygame 1.9.3 and finally made it available with pip! Thumbs Up

PS: first post here, hi everybody!