【问题标题】:Unable to install PyAudio on windows 10无法在 Windows 10 上安装 PyAudio
【发布时间】:2019-08-05 21:42:07
【问题描述】:

我尝试在 Windows 10 上安装 pyaudio,但出现以下错误:

pip install python-pyaudio
Collecting python-pyaudio
  ERROR: Could not find a version that satisfies the requirement python-pyaudio (from versions: none)
ERROR: No matching distribution found for python-pyaudio

C:\Users\lenovo>pip install pyaudio
Collecting pyaudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\lenovo\AppData\Local\Temp\pip-record-26rv078i\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\lenovo\AppData\Local\Temp\pip-install-d7mfqufu\pyaudio\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    copying src\pyaudio.py -> build\lib.win-amd64-3.7
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\lenovo\AppData\Local\Temp\pip-record-26rv078i\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

关于如何尝试解决此问题的任何建议?

【问题讨论】:

  • 看来需要安装Microsft Visual C++ 14.0

标签: python speech-recognition pyaudio


【解决方案1】:

需要安装Microsoft Visual c++ 14.0,可以在这里获取:http://landinghub.visualstudio.com/visual-cpp-build-tools

【讨论】:

    猜你喜欢
    • 2019-05-20
    • 2021-12-04
    • 1970-01-01
    • 2022-10-07
    • 2018-11-30
    • 2020-11-02
    • 2020-05-03
    • 2021-06-18
    • 2017-05-12
    相关资源
    最近更新 更多