gpt4 book ai didi

python - 无法在 google colab 中安装 pyaudio

转载 作者:行者123 更新时间:2023-12-04 12:34:03 27 4
gpt4 key购买 nike

当我试图运行时 pip install 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
ERROR: Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o_0h_bmo/PyAudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o_0h_bmo/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 /tmp/pip-record-8_ovxdkm/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

最佳答案

您只需要删除 libav-tools从 apt install 并再次运行此命令。!apt install libasound2-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg进而!pip install PyAudio您将能够安装它。

关于python - 无法在 google colab 中安装 pyaudio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66412902/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com