Install & Compatibility
Where this runs
tested against v2.5.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
build_error
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.4s · import 0.120s · 51MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pygame
✓ import pygame
Pygame-ce is designed to be a drop-in replacement for the original Pygame, using the same import name.
This basic example initializes Pygame-ce, creates a window, sets its title, and enters a game loop. Inside the loop, it handles the `QUIT` event to close the window, fills the screen with a blue color, draws a white circle, and updates the display. Finally, it properly shuts down Pygame.
import pygame
import sys
pygame.init()
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = 'Pygame-CE Quickstart'
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption(SCREEN_TITLE)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill(BLUE) # Fill the screen with blue
# Example: Draw a white circle
pygame.draw.circle(screen, WHITE, (SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2), 50)
pygame.display.flip() # Update the full display Surface to the screen
pygame.quit()
sys.exit()
Debug
Known issues
breakingPython 3.9 support was dropped in `pygame-ce 2.5.7`. PyPy 3.9 and 3.10 support was dropped in `pygame-ce 2.5.6`. Ensure your Python environment meets the `requires_python` specification (`>=3.10` for 2.5.7).fixUpgrade Python to a supported version (e.g., Python 3.10-3.14).
affects: >=2.5.6
breakingPygame-ce is undergoing a significant migration to SDL3. While `2.5.x` versions aim for compatibility with SDL3 compilation, `pygame-ce 3.0` is planned to introduce breaking API changes related to this migration, including potential changes to mouse APIs and audio support.fixReview `pygame-ce` 3.0 release notes and documentation carefully for migration guides when upgrading to `3.x` versions. Keep track of the SDL3 porting discussion on GitHub.
affects: >=2.5.4 (preparatory work), 3.0.0 (full impact)
gotchaInstalling `pygame-ce` while the original `pygame` package is already present can lead to conflicts, as both use the `pygame` import name. This often results in the original `pygame` being imported instead of `pygame-ce`.fixAlways run `pip uninstall pygame` before `pip install pygame-ce` to ensure only the Community Edition is active. Use a virtual environment to manage dependencies isolatedly.
affects: All versions
Upgrade
Version history
2.5.7latest on PyPI · released Mar 2, 2026
Audit
Dependencies
PythonrequiredRequires Python >= 3.10. Support for older Python and PyPy versions is actively dropped.
SDLrequiredCore dependency for graphics, audio, and input. Binaries are usually included in wheels.