Pre-built SDL2 binaries for PySDL2
Low maintenance activity. Last release 6 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pysdl2-dllpysdl2-dll
pysdl2-dll is a Python package that bundles the SDL2 binaries in pip-installable form for macOS and Windows, making it easier to create and run scripts/packages that use the PySDL2 library.
It uses the official SDL2, SDL2_mixer, SDL2_ttf, and SDL2_image binaries for macOS and Windows, as well as unofficial SDL2_gfx binaries for the same platforms. For Linux, the SDL2 binaries and their dependencies are all built from source using the official Python manylinux images for maximum compatibility.
The latest release includes the following versions of the SDL2 binaries:
| SDL2 | SDL2_ttf | SDL2_mixer | SDL2_image | SDL2_gfx |
|---|---|---|---|---|
| 2.32.10 | 2.24.0 | 2.8.2 | 2.8.12 | 1.0.4 |
Installation
You can install the latest version of pysdl2-dll via pip:
pip install pysdl2-dll # install latest release version
Requirements
At present, the following platforms are supported:
- macOS (10.11+, 64-bit x86)
- macOS (11.0+, 64-bit ARM)
- Windows (32-bit x86)
- Windows (64-bit x86)
- Linux (32-bit x86)
- Linux (64-bit x86)
- Linux (64-bit ARM)
The pysdl2-dll package can be installed on platforms other than the ones listed above, but it won't have any effect.
pysdl2-dll requires PySDL2 0.9.7 or later in order to work correctly. To update to the latest PySDL2, you can run:
pip install -U pysdl2
Because the wheels are not built against any specfic version of Python, pysdl2-dll supports all versions and implementations of Python that are supported by PySDL2.
Linux Requirements
There are currently two versions the Linux wheels: "legacy" wheels based on the standard (for 32-bit and 64-bit x86), and "modern" wheels based on the standard (for 64-bit x86 and 64-bit ARM only). The SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as native Wayland windowing, Pipewire audio, and Vulkan rendering.