Pour lancer directement un truc avec pygame il faut installer SDL apparemment
voici comment faire:
(source :
https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/)
Let’s start by updating our Raspbian installation, feel free to skip this step if your system was recently updated:
sudo apt-get update
sudo apt-get upgrade
Next, we will need to install some libraries that will be used when we build SDL 2:
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg8-dev libtiff5-dev libwebp-dev automake
SDL 2 can be downloaded from
https://www.libsdl.org/download-2.0.php, be sure to select the source code archive, SDL2-2.0.3.tar.gz, or a newer version if available. You can download and extract the archive directly on your Raspberry Pi:
cd ~
wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar zxvf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3 && mkdir build && cd build
Now, it is time to configure SDL 2:
../configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
or, if you have a Raspberry Pi 2 or 3:
../configure --host=armv7l-raspberry-linux-gnueabihf --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
The above options will make sure, SDL 2 is built with the OpenGL ES backend and that any SDLapplication will run as a full screen application, the windowed mode under X tends to be more buggy onRaspberry Pi. On the plus side, you will be able to launch your application, or game, directly from the text interface without the overhead of running the X server. If you wish you can start your application fromLXDE (the default window manager for Raspbian) and the application will run full screen.
Assuming, you’ve had no error in the configure phase, you can actually build and install the library:
make -j 4
sudo make install