PYTHON2 Неудачное строительное колесо PyAudio и PortAudio

У меня проблема с PyAudio и PortAudio, я хочу использовать распознавание речи, поэтому для распознавания речи нужен модуль PyAudio, и я попытался установить, но он не работает, я ищу почти все, и я использую ParrotOS и Python 2.7.16.

Итак, я попробовал это;

pip install install clang

apt-get install & apt-get update но это не работает

Когда я пишу в консоль этот код;

sudo pip install portaudio

or

sudo pip install PyAudio

это показывает мне это;

Collecting pyaudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (setup.py) ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-934KKj/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-tVvPhL --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
  running build_ext
  building '_portaudio' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-UboFgi/python2.7-2.7.16~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
  src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
   #include "portaudio.h"
            ^~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyaudio
  Running setup.py clean for pyaudio
Failed to build pyaudio

и другие сообщения об ошибках.


person Bash    schedule 13.03.2019    source источник


Ответы (1)


sudo apt-get install portaudio19-dev
pip install pyaudio

а позже я устанавливаю pyaudio :)

person Bash    schedule 02.04.2019