pymedia is not available for simple installation from the standard Raspbian repositories. (This may mean there is some problem with building it for Debian/Raspbian.)
If you want to try building it yourself the program webpage is here:
http://pymedia.org/
Alternatively, the packages vlc and omxplayer are both capable of playing .mp3 files and there are many examples online of how to call them from within a python script.