Python PyGame installation

PyGame is trivial to install on most devices. PyGame allows playing sound from Numpy arrays.

pip install pygame

pip prefers .whl binaries over compiling.

Source compile pip (optional)

Force PyGame manual source compilation:

apt install mercurial ffmpeg libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libfreetype6-dev libavformat-dev libportmidi-dev libswscale-dev

pip install hg+http://bitbucket.org/pygame/pygame

Manual compile Pygame

This is rarely needed.

hg clone http://bitbucket.org/pygame/pygame

cd pygame

pip install -e .

Notes

Leave a Comment