Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to build/install pymedia, I get the following error:

    Continue building pymedia ? [Y,n]:y
    running install
    running build
    running build_py
    running build_ext
    building '' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -DBUILD_NUM=1869 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -I/home/selby/Downloads/pymedia -Isound/ -I/usr/include/python2.7 -c sound/sound.cpp -o build/temp.linux-i686-2

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
sound/sound.cpp:23:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

I have no idea what it means or how to fix it, how do I install?

share|improve this question
Possible duplicate of I cannot install Python modules – David Foerster Feb 23 at 10:04

Do you have the python development libraries installed? You can do that by running this command:

sudo apt-get install python-dev
share|improve this answer
That still hasn't worked. I can't put the output here, it won't fit. – Selby Rowley-Cannon Jul 29 '12 at 21:02
@Selby Please add the output in your question, not a comment! – Jorge Castro Jul 31 '12 at 3:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.