Installing PyGame on Raspberry Pi (Quick List)

There are a few dependencies for installing but here is a list which works. The link to the original which I have mostly copied is here:

Stack Overflow

The full list of instructions below should do it:

cd ~
sudo apt-get install python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev \
  libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev \
  libavformat-dev libswscale-dev libjpeg-dev libfreetype6-dev
sudo apt-get install mercurial
hg clone https://bitbucket.org/pygame/pygame
cd pygame
python3 setup.py build
sudo python3 setup.py install

And voila you should have it. To test:


python3
>>>> import pygame

If it throws an error then pygame has not installed properly.

Posted in Uncategorized