Pygame troubleshooting

Step-by-step fixes for the problems people hit most often, from installation errors to frozen windows, black screens and missing sound.

Guides

No sound

Silent games, mixer errors, delays and crackling.

Find your problem quickly#

What you seeRead
pip fails, or installs nothingPygame won't install
Long build errors, sdl2-config, Visual C++, externally-managed-environmentpip install errors
ModuleNotFoundError: No module named 'pygame'No module named pygame
New Python version won't install PygamePython compatibility
Window freezes, says "Not Responding" or won't closeWindow not responding
Window opens but stays blackBlack screen
Silence, mixer not initialized, delayed soundNo sound

Before asking for help#

Collect this information; it answers most questions straight away:

Terminal
python --version
python -c "import pygame, sys; print(pygame.version.ver, sys.platform, sys.executable)"

Include the full error message (copy the text, not a screenshot), what you expected, and a small piece of code that reproduces the problem. Bugs in Pygame itself can be reported to the pygame or pygame-ce issue trackers.

↑ ↓ to moveEnter to openEsc to close