First install all the dependencies:
sudo apt-get install python-dev libogg-dev libvorbis-dev liblame-dev libfaad2-dev libasound2-dev python-pygame(Pygame is not really necessary, but recommended.)
Extract a download of pymedia-*.tgz and open a terminal in the extracted folder, so we can build pymedia:
python setup.py build
This should display:
Using UNIX configuration...
OGG : found
VORBIS : found
FAAD : found
MP3LAME : found
VORBISENC : found
ALSA : found
Continue building pymedia ? [Y,n]:
If everything is found press Y
Finally install pymedia:
sudo python setup.py install
Test if pymedia installed correctly by typing this at the python shell:
import pymedia
You may now proceed to the pymedia tutorials.