Gcc错误,没有这样的文件或目录“ Python.h”-在centOS7上安装pyAudio

问题描述 投票:0回答:1

我在CentOS7上安装了python 3.6.8,并且我正在尝试使用]安装pyaudio。

sudo python3.6 -m pip安装pyaudio

此格式可以事先安装一些其他东西,但是如果我在这里使用它,则会出现以下错误

src/_portaudiomodule.c:28:10: fatal error: Python.h: No such file or directory
 #include "Python.h"
          ^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

pip install pyaudio获得相同的结果

我已经阅读了问题和答案here,但仍然无法解决

安装方面有任何建议吗?预先谢谢!

我在CentOS7上安装了python 3.6.8,我正在尝试使用sudo python3.6安装pyaudio -m pip install pyaudio这种格式可以在事前安装一些其他东西,但是...

python-3.x centos7 pyaudio portaudio
1个回答
0
投票

pyaudio似乎正在编译一些需要Python.h的C代码,要解决此第一个问题,请检查此答案https://stackoverflow.com/a/21530768/9799292

© www.soinside.com 2019 - 2024. All rights reserved.