pysdl2-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.0.22 | 2.20.0 | 2.6.0 | 2.6.0 | 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.7+, 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 on macOS, and for PySDL2 to load the binaries automatically when available. 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.
Note: As of pysdl2-dll 2.0.22.post1, the macOS binaries no longer have built-in support for the WebP image format in SDL_image or the Modplug, Opus, or native MIDI backends in SDL_mixer. This is due to changes in the official macOS binaries from the libSDL team, which will hopefully be brought back to full feature parity with the official Windows binaries in a future release.
Linux Requirements
There are currently two versions the Linux wheels: "legacy" wheels based on the manylinux2014 standard (for 32-bit and 64-bit x86), and "modern" wheels based on the manylinux_2_24 standard (for 64-bit x86 and 64-bit ARM only). The manylinux_2_24 SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as Wayland windowing, Pipewire/sndio/JACK audio, and OpenGL ES v1 rendering.
You must have pip 19.3 or newer to install the manylinux2014 wheels, and pip 20.3 or newer to install the manylinux_2_24 wheels. Distributions that use musl C instead of glibc (e.g. Alpine Linux) are not supported.
Note: pysdl2-dll is currently not built with libdecor support, meaning that native Wayland (non-XWayland) window decorations will be unavailable when using these binaries (see issue #9 for details). Given that SDL2 defaults to using XWayland this shouldn't be an issue for most users, but suggestions and/or PRs to fix the issue are welcome!
Usage
If you are using PySDL2 0.9.7 or later, you don't need to do anything special to use the pysdl2-dll binaries in your project: PySDL2 will load them automatically (and print a message indicating such) if they are available. For older versions of PySDL2, you will need to import this module manually in your scripts (import sdl2dll) before PySDL2 is imported.
To override pysdl2-dll and use a different set of binaries, you can set the PYSDL2_DLL_PATH environment variable to the path of the folder containing the binaries you want to use instead, or alternatively set it to "system" to force PySDL2 to use the system install of SDL2 if available (e.g. SDL2 installed with brew on macOS).
Release files for pysdl2-dll 2.0.22.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pysdl2-dll-2.0.22.post1.tar.gz | 15.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl | Python 2, Python 3 | none | Windows x86-64 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl | Python 2, Python 3 | none | Windows x86-32 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl | Python 3, Python 2 | none | Linux glibc 2.24+ x86-64 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl | Python 2, Python 3 | none | Linux glibc 2.24+ ARM64 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl | Python 2, Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl | Python 2, Python 3 | none | Linux glibc 2.17+ x86-32 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl | Python 3, Python 2 | none | macOS 10.7+ x86-64 | Details |
| pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl | Python 2, Python 3 | none | macOS 10.7+ universal2 (ARM64, x86-64) | Details |
Total release size:27.1 MB
Release files / pysdl2-dll-2.0.22.post1.tar.gz
| Download URL | pysdl2-dll-2.0.22.post1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13502124b050403c62a00dcefec4178490ee98a9923d15aa52607d3ee033c50b
|
|
BLAKE2b-256 checksum How to use checksums |
01c0461fb92c01a683bf142a7653a90fc9543e978c674b789158ea02f4155567
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 2 Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e20071326d2c45e4868d82e6d7919425ea0e87a6496866df049a6556629a71c0
|
|
BLAKE2b-256 checksum How to use checksums |
df6f7ac2620add21658d2fdfb6035bd05c390f4555391fa80137bfe0d81a20f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Python 2 Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
6f44449a3c6d1103beb9766e1e54de7575dc4b2bf7dd15690543dc1c09662274
|
|
BLAKE2b-256 checksum How to use checksums |
adbb3d210e38aa025752b5b262dc389a845f54ab55c7078ffa0ee6bff724f725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Linux glibc 2.24+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d80592eb4c9e067ad5b386c8d43bf46fdfb8c78c002001073c92d17499bb0827
|
|
BLAKE2b-256 checksum How to use checksums |
c379fa76b7d5c84a3adb55f43f388e413c0805f8a9a33368647e0ebaeb619ef5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux glibc 2.24+ ARM64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da4c764690b17d78cf7687ae07faa80a6bfc855727ff80e34156e8915de50b9f
|
|
BLAKE2b-256 checksum How to use checksums |
8acf06f5f53671cb81852c98a1cf9150f0c9aeedef4a527c76a240385764a13b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d767875309beeac2b1c9d3edfc0dd0d3c0a4f59944d9c50b1324c2d55f8d388b
|
|
BLAKE2b-256 checksum How to use checksums |
f45dff8e33870585121bf5b5bb94feda1b32cfc012d6dd418b6fef939b75d740
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Linux glibc 2.17+ x86-32 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e484d9285f7ffad3666df1f73bf0083146ae23d6dc941bb7b49536ddcb1cdb8d
|
|
BLAKE2b-256 checksum How to use checksums |
50c13ca10687c8ad1d9dd4842595d1e8b6bee27504921ad00f1ada2d7bc05a18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 2 Python 3 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
e35d1700cbeaf65faa8d32ca088f33751f463bf4a0f917a470f84619a95018b7
|
|
BLAKE2b-256 checksum How to use checksums |
f5d136493edf20724f5ce9552ff27f0e11f1f5b967301ed8509a5f3191337d7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl
| Download URL | pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 2 Python 3 macOS 10.7+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
764a3fb8fae5679f4773461430f85906e2d1c100c4fb5c16b9bbc9ae575d3d0f
|
|
BLAKE2b-256 checksum How to use checksums |
94726d0959acc576902be04c02509b107a89965f5d5284f8497d43d34a7743b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|