Find below different installation schemes for each supported operating systems. Keep in mind that these bindings require the SFML framework installed along (except on Windows), and their versions have to match.


Since version 2.3.2, these bindings were added to PyPI (the Python Package Index repository) and really is the way you should install SFML.

We also recommend the use of virtualenv which is a tool to create isolated Python environments. It allows greater flexibility and allow you to install different version of these bindings alongside. The instructions below will run just fine in these virtual environments.

If you wish to compile these bindings from their source code, check this document which provides you with complete instruction sets to configure the compilation environment.


The best way to install these bindings on Windows is via the pip command. Eventually, suffix the command below with ==x,y,z to install a specific version of them.

pip install pySFML

They will work out of the box because the corresponding SFML libraries were bundled (compiled statically); you don’t have to install SFML manually.

Alternatively, you can install these bindings with one of the installer below. Select it according to your Python version and the targetted architecture.

For more complex projects like those which embed a Python interpreter, you probably want to recompile these bindings against the dynamic version of SFML libraries.

Mac OS X

To be written.

Debian and Ubuntu

The SFML framework and these bindings are in the official package repositories and therefore can be installed with aptitude.

apt-get install python-sfml # or python3-sfml

This command install the corresponding SFML framework alongside. However, you are limited to the given current version of SFML of your distribution.

Because you’re high likely to work with a specific version of SFML, an alternative is install via pip. However, you’re responsible to have the corresponding SFML version installed system-wide.

apt-get install python-cython # or python3-cython
pip install pySFML=x.y.z

With x, y, z matching the installed version of SFML on your system. Installing Cython is necessary because it will indirectly compile these bindings before installing them.


It makes sense that you uninstall any SFML related packages if you intend to install a specific version of SFML (and incidentally these bindings) system-wide.

You may also install SFML locally and use environment variables (and perhaps virtualenv) to keep your system clean.


To be written.


To be written.