Registry / ai-ml / pygame-ce

pygame-ce

JSON →
library2.5.7pypypiunverified

Pygame-ce (Pygame Community Edition) is an actively maintained, free and open-source Python library for multimedia applications and game development. It is a community-driven fork of the original Pygame, built on top of the Simple DirectMedia Layer (SDL) library. It offers frequent updates, bug fixes, performance enhancements, and improved compatibility with newer Python versions and operating systems. The current stable version is 2.5.7.

pip uninstall pygame # (if previously installed, to avoid package conflicts)
INSTALL
IMPORT
SIG · PYGAME-CE
P
pygame-ce
ai-mlpythonv2.5.7
Install
2.4s avg
Import
120ms
Disk
50MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
build_error
glibc
py 3.103.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).
fix
Upgrade 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.
fix
Review `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`.
fix
Always 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.
Agent activity
134 hits · last 30 days
node
132
Amazon
1
OpenAI (training)
1
Resources
pygame-ce — pip install pygame-ce · libregistry