Skip to content Skip to sidebar Skip to footer

Error When Installing Pygame On Mac (catalina)

I have been trying to install PyGame onto my Mac on Catalina and can't figure out how to. The error message I get is: SystemExit: error: command 'gcc' failed with exit status 1. Is

Solution 1:

Your error is right here:

src_c/_pygame.h:216:10: fatal error: 'SDL.h' file not found

You need to install the SDL development files. I haven't personally used macOS in a little while now but if you have homebrew installed, I believe brew install sdl should do the trick.

Solution 2:

Try using Python 3.7 instead of Python 3.8. I got the same error you got when installing pygame on Catalina with Python 3.8, but I found that it works perfectly with Python 3.7. No need to use brew or manually install sdl.

Post a Comment for "Error When Installing Pygame On Mac (catalina)"