Unable to install pyAudio package

前端 未结 4 1038
再見小時候
再見小時候 2021-01-14 17:39

I am building a speech recognition program but can\'t install pyAudio.

I have installed Microsoft visual c++ 14.0.0 but still, I am getting another error. I can\'t u

相关标签:
4条回答
  • 2021-01-14 18:06

    Download the binary installer for Windows and just install the PyAudio package with no nonsense.

    PyAudio is built on top of portaudio library and you require portaudio to be there. The binary installer comes with precompiled version of portaudio as a dynamically linked library and there is no need for hunting and compiling the source.

    PyAudio is a great library, enjoy working with it.

    0 讨论(0)
  • 2021-01-14 18:16

    These are notes for installation on Microsoft Windows:

    pip will fetch and install PyAudio wheels (prepackaged binaries). Currently, there are wheels compatible with the official distributions of Python 2.7, 3.4, 3.5, and 3.6. For those versions, both 32-bit and 64-bit wheels are available.

    You are using Python 3.7, which is not compatible with PyAudio. However...

    EDIT:

    As user @Dalen states, there are prebuilt binaries (.exe files) for pyAudio. I installed from their archive stated in documentation but importing pyAudio had an output:

    There are unofficial binaries for Windows on this site: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio .

    Download the proper one and install it.

    0 讨论(0)
  • 2021-01-14 18:31

    the key info in the error message is "Cannot open include file: 'portaudio.h': No such file or directory"

    so you should google it, and you will find it have an answer in stackoverflow: https://stackoverflow.com/a/52191687/5232323

    the current version PyAudio 0.2.11 is not supported for Python 3.7

    0 讨论(0)
  • 2021-01-14 18:31
    pip install pipwin
    
    pipwin install pyaudio
    

    Try these commands in prompt. It does not require any manual downloads or searches etc. pipwin is a complementary tool for pip on Windows. It is capable of installing unofficial python package binaries for Windows provided by Christoph Gohlke

    0 讨论(0)
提交回复
热议问题