【问题标题】:PyAudio installation problemsPyAudio 安装问题
【发布时间】:2018-09-23 09:12:52
【问题描述】:

我正在尝试在 Python 3.7 上安装 PyAudio。

问题是当我尝试一个简单的import pyaudio 时它会打印:

Please build and install the PortAudio Python bindings first.

根据this post,可以通过下载他的二进制文件并安装*来解决问题。

但是pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl 只显示:

Cannot uninstall 'PyAudio'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

有没有其他方法可以完全删除 PyAudio 以尝试第一个解决方案,还是我必须手动构建 PortAudio ?

我正在运行 Windows 10 64 位。

【问题讨论】:

    标签: python pyaudio portaudio


    【解决方案1】:

    这是我设法解决问题的方法:

    我手动删除了库文件夹中的 PyAudio 和 Portaudio 文件。

    然后,如here 所述,我继续this 下载.whl 并使用Windows 命令安装它:pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl

    它似乎工作正常,因为我没有更多的错误输出。

    【讨论】: