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:

Download: file
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. 

Download: file
sudo apt-get install python-setuptools
sudo easy_install rpi.gpio

Install the ALSA sound utilities and a mp3 player:

Download: file
$ sudo apt-get install alsa-utils
$ sudo apt-get install mpg321
This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (Necessary Packages) was last updated on May 04, 2015.