Skip to content
project-owner edited this page Mar 2, 2024 · 15 revisions

Pygame comes with some versions of Raspbian OS. To make sure that it's available in your OS version start Python interpreter and type the following line at prompt:

import pygame

You shouldn't see any exceptions. If you see import exception that means there is no Pygame and it should be installed by using the following command:

sudo apt-get install python3-pygame

Pygame leverages library libsdl1.2 which has some issues with touchscreens. Therefore the patched version of libsdl1.2 should be loaded and installed (many thanks to Gerhard for making the patch):

wget https://www.dropbox.com/s/0tkdym8ojhcmbu2/libsdl1.2debian_1.2.15+veloci1-1_armhf.deb
sudo dpkg -i libsdl1.2debian_1.2.15+veloci1-1_armhf.deb
sudo apt-get -f install
rm libsdl1.2debian_1.2.15+veloci1-1_armhf.deb

<<Previous | Next>>

Contents

Clone this wiki locally