Ubuntu pyaudio安装报错:ERROR: Could not build wheels for pyaudio, which is required to install pyproject

这篇具有很好参考价值的文章主要介绍了Ubuntu pyaudio安装报错:ERROR: Could not build wheels for pyaudio, which is required to install pyproject。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

报错信息如下:

(pytorch) fish@asus:~/文档/speech_rec$ pip install pyaudio
Collecting pyaudio
  Downloading PyAudio-0.2.13.tar.gz (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.8/46.8 kB 367.6 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyaudio (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/pyaudio
      copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-38/pyaudio
      running build_ext
      building 'pyaudio._portaudio' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/src
      creating build/temp.linux-x86_64-cpython-38/src/pyaudio
      gcc -pthread -B /home/fish/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -I/home/fish/anaconda3/envs/pytorch/include/python3.8 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-38/src/pyaudio/device_api.o
      src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: 没有那个文件或目录
          9 | #include "portaudio.h"
            |          ^~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects

这个和windows处理方法不同,执行下面命令即可:文章来源地址https://www.toymoban.com/news/detail-657573.html

sudo apt-get install portaudio19-dev
sudo apt-get install python3-all-dev
pip install pyaudio

到了这里,关于Ubuntu pyaudio安装报错:ERROR: Could not build wheels for pyaudio, which is required to install pyproject的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决opencv-python 安装报错 Could not build wheels for opencv-python

    但是发现更新完了之后还是没用,因为主要原因是如果直接安装opencv默认安装最新版,此时找一个python3.6支持的版本就行了,如4.3.0.38,使用如下命令即可成功安装

    2024年02月16日
    浏览(64)
  • cryptography构建报错(Could not build wheels for cryptography)

    一个经常开发的python项目,在今天打包镜像的时候突然报错,报错内容如下: 使用“Could not build wheels for cryptography, which is required to install pyproject.toml-based projects”去网络上搜集解决方法,都没有解决。接着,尝试重新初始化项目环境后重新打包镜像,还是报一样的错误。 很

    2023年04月08日
    浏览(50)
  • pip install d2l提示ERROR: Could not build wheels for pandas

    pip install d2l会报这个错 解决办法: 另一种方法: 去d2l包的官方网站,然后将包下载下来,然后再在cmd窗口安装。 d2l包的官方网站: https://www.cnpython.com/pypi/d2l/download      下载到你的虚拟环境里。然后win+R打开cmd窗口,切换到你的环境路径那里: 像我的文件下载到的路径是

    2024年02月12日
    浏览(54)
  • pip install mpi4py报错:ERROR: Could not build wheels for mpi4py, which is required to install pyprojec

    在 conda 环境下 pip install mpi4py 安装 mpi4py 库时出现编译报错,报错信息为: 所以导致该错误的原因是 即没有找到 x86_64-conda_cos6-linux-gnu-cc 。只需执行以下命令安装即可: 安装完成后重新执行 pip install mpi4py 即可完成安装。

    2024年02月16日
    浏览(51)
  • pycocotools:ERROR: Could not build wheels for pycocotools, which is required to install pyproject...

    在pip安装YOLOv5包的时候出现错误 \\\"ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects\\\",在网上找了很多资料都行不通,最后参考博文 windows 安装pycocotools:ERROR: Could not build wheels for pycocotools, which is required to install py_放羊Wa的博客-CSDN博客 ERROR: Cou

    2024年02月11日
    浏览(62)
  • python库安装:Could not build wheels for opencv-python

    完整指令如下: pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==4.3.0.38

    2024年02月15日
    浏览(50)
  • ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed directl

    安装yolov5依赖库时,最后pycocotools报错 重点是以下原因: error: Microsoft Visual C++ 14.0 or greater is required. Get it with \\\"Microsoft C++ Build Tools\\\": https://visualstudio.microsoft.com/visual-cpp-build-tools/ 尝试的解决方法如下: 1、直接下载VS2022中,工作负荷里有关C++和Python的(未成功) 结果报错 vs2

    2024年02月02日
    浏览(52)
  • paddleocr:ERROR: Could not build wheels for lanms-neo, which is required to install pyproject

    https://blog.csdn.net/zzpl139/article/details/127734431 Microsoft Visual Studio(简称VS)是美国微软公司的开发工具包系列产品。VS是一个基本完整的开发工具集,它包括了整个软件生命周期中所需要的大部分工具,如UML工具、代码管控工具、集成开发环境(IDE)等等。所写的目标代码适用于微软

    2024年02月13日
    浏览(51)
  • ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based

    记录一下,安装aiohttp库出现的问题 问题1:报两个错误, 解决方法:ERROR: Failed building wheel for yarl,根据这个,安装需要的库yarl, 用pip install yarl 不行,下载whl,用下面的就行 存档: Python Extension Packages for Windows - Christoph Gohlke 用这种格式安装   类似,ERROR: Failed building wheel

    2024年02月11日
    浏览(43)
  • 关于Could not build wheels for opencv-python-headless, which is...报错的解决方案

    在通过最新版pip在线安装package:opencv-python-headless的时候,会产生报错信息,主要为  ERROR: Failed building wheel for opencv-python-headless ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects  如图:  解决方案一:在线加载( 简单快捷,成功率较低

    2024年02月08日
    浏览(57)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包