Registry / pysdl2-dll

pysdl2-dll

JSON →
library2.32.10pypypi✓ verified 82d ago

Provides pre-built SDL2 binaries for PySDL2, ensuring cross-platform compatibility without requiring users to compile SDL2 themselves. Current version 2.32.0, released irregularly alongside SDL2 updates.

pip install pysdl2-dll
INSTALL
IMPORT
SIG · PYSDL2-DLL
P
pysdl2-dll
pythonv2.32.10
Install
1.8s avg
Import
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.32.10 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 30MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dll_path
from sdl2dll import dll_path
from sdl2 import dll
get_dllpath
from sdl2dll import get_dllpath
init_check
from sdl2dll import init_check

Verify SDL2 binaries are loaded by initializing PySDL2.

import os os.environ['PYSDL2_DLL_PATH'] = '' # optional: clear custom path to use default from sdl2 import * import sdl2.ext sdl2.ext.init() # SDL2 is now ready to use
Debug
Known issues
gotchaDo NOT import from pysdl2_dll directly. This package only provides DLL files; use PySDL2's sdl2 module instead.
fix
Instead of 'from pysdl2_dll import *', use 'from sdl2 import *'.
affects: all
breakingVersion 2.30.0+ changed the DLL directory structure. Custom PYSDL2_DLL_PATH may need to point to the new location inside site-packages.
fix
Set PYSDL2_DLL_PATH to the 'dll' subdirectory: e.g., os.environ['PYSDL2_DLL_PATH'] = os.path.join(sys.prefix, 'Lib', 'site-packages', 'sdl2', 'dll').
affects: >=2.30.0
gotchaOn macOS, the DLLs are universal binaries, but not signed/notarized. Gatekeeper may block execution.
fix
Use a terminal command: 'xattr -d com.apple.quarantine /path/to/libSDL2*.dylib' or add an exception in Security & Privacy.
affects: all
Upgrade
Version history
2.32.10latest on PyPI · released May 26, 2026
Audit
Dependencies
PySDL2requiredPython bindings for SDL2
numpyoptionalOptional for pixel array operations
Agent activity
4 hits · last 30 days
node
4
Resources
pysdl2-dll — pip install pysdl2-dll · libregistry