­

在Centos7上安装Python-de

在安装audiotoolsmake install出现问题

running build_ext  building 'audiotools.pcm' extension  creating build/temp.linux-x86_64-2.7  creating build/temp.linux-x86_64-2.7/src  gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/pcm.c -o build/temp.linux-x86_64-2.7/src/pcm.o  src/pcm.c:2:20: 致命错误:Python.h:没有那个文件或目录   #include <Python.h>                      ^  编译中断。  error: command 'gcc' failed with exit status 1  make: *** [install] 错误 1

因为缺少Python.h

解决

安装Python-dev,但是在centos上面没有该包

[root@master audiotools-3.0]# yum install python-dev  已加载插件:fastestmirror  Loading mirror speeds from cached hostfile   * base: mirrors.163.com   * extras: centos.ustc.edu.cn   * updates: mirrors.163.com  没有可用软件包 python-dev。

因为该centos上面Python-devPython-devel