Skip to main content

Pre-built SDL2 binaries for PySDL2

Project description


Build Status Build Status

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.

The latest release includes the following versions of the SDL2 binaries:

SDL2 SDL2_ttf SDL2_mixer SDL2_image SDL2_gfx
2.0.14 2.0.15 2.0.4 2.0.5 1.0.4


You can install the latest version of pysdl2-dll via pip:

pip install pysdl2-dll # install latest release version


At present, the following platforms are supported:

  • macOS (10.6+, 64-bit)
  • Windows 32-bit
  • Windows 64-bit

Linux is not currently supported as no official binaries are available, though support may be added in future with a manylinux build system (pull requests welcome). The pysdl2-dll package can be installed on Linux and other unsupported platforms without issue, 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


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).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pysdl2-dll, version 2.0.14.post1
Filename, size File type Python version Upload date Hashes
Filename, size pysdl2_dll-2.0.14.post1-py2.py3-none-macosx_10_6_x86_64.whl (4.1 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pysdl2_dll-2.0.14.post1-py2.py3-none-win32.whl (2.4 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pysdl2_dll-2.0.14.post1-py2.py3-none-win_amd64.whl (2.6 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pysdl2-dll-2.0.14.post1.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page