Necessary Packages

If you've already worked through Playing Sounds and Using Buttons with the Raspberry Pi, you're probably good to go here. Otherwise, you may need a few things. Open up a terminal, and enter the following commands:

Update Python (2.x) to the latest release:

sudo apt-get update
sudo apt-get install python-dev

Install the latest RPi.GPIO module. We will use easy_install to manage the python packages. 

sudo apt-get install python-setuptools
sudo easy_install rpi.gpio

Install the ALSA sound utilities and a mp3 player:

$ sudo apt-get install alsa-utils
$ sudo apt-get install mpg321
Last updated on 2015-05-04 at 04.25.41 PM Published on 2012-07-29 at 11.58.38 AM