当我尝试构建/安装 pymedia 时,出现以下错误:
Continue building pymedia ? [Y,n]:y
running install
running build
running build_py
running build_ext
building 'pymedia.audio.sound' 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
.7/sound/sound.o
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
我不知道这是什么意思或者如何修复它,我该如何安装?
答案1
您是否安装了 Python 开发库?您可以运行以下命令来安装:
sudo apt-get install python-dev