当前位置: 首页 > news >正文

pip install pyaudio安装报错ERROR: Failed building wheel for pyaudio解决

PyAudio

PyAudio

PyAudio 为跨平台音频 I/O 库 PortAudio 提供 Python 绑定。借助 PyAudio,您可以轻松地使用 Python 在各种平台上播放和录制音频,例如 GNU/Linux、Microsoft Windows 和 Apple macOS。

报错Failed building wheel for pyaudio

安装pip install pyaudio时,报错:
ERROR: Failed building wheel for pyaudio
Building wheel for pyaudio (pyproject.toml) … error
error: subprocess-exited-with-error
Failed to build pyaudio
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyaudio)
无法为pyaudio生成轮子,因为未安装程序包’wheel‘
错误:无法为py音频构建轮子,这是安装pyproject.toml项目所必需的
由于未安装软件包“wheel”,无法为pyaudio构建轮子
错误:无法为pyaudio构建轮,这是安装基于pyproject.toml的项目所需的
错误:无法在Python中为 pyaudio 构建轮子
ERROR: Could not build wheels for pyaudio in Python

完整报错信息如下:

  PS C:\Users\easyb\Desktop\test> 
>> pip install PyAudio
Defaulting to user installation because normal site-packages is not writeable
Collecting PyAudioUsing cached PyAudio-0.2.14.tar.gz (47 kB)Installing build dependencies ... doneGetting requirements to build wheel ... donePreparing metadata (pyproject.toml) ... done
Building wheels for collected packages: PyAudioBuilding wheel for PyAudio (pyproject.toml) ... errorerror: subprocess-exited-with-error× Building wheel for PyAudio (pyproject.toml) did not run successfully.│ exit code: 1╰─> [9 lines of output]WARNING:root:Warning: VCPKG_PATH envrionment variable not set.INFO:root:running bdist_wheelINFO:root:running buildINFO:root:running build_pyINFO:root:creating build\lib.win-amd64-cpython-313\pyaudioINFO:root:copying src\pyaudio\__init__.py -> build\lib.win-amd64-cpython-313\pyaudioINFO:root:running build_extINFO:root:building 'pyaudio._portaudio' extensionerror: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/[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

解决

网上资料下载链接https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio已经失效The page you requested was removed.
花了些时间搜集,并在这里上传。

上传wheel版本如下,可在绑定资源下载:

PyAudio-0.2.13-cp310-cp310-linux_x86_64.whl

PyAudio-0.2.13-cp310-cp310-macosx_11_0_x86_64.whl

PyAudio-0.2.13-cp310-cp310-win_amd64.whl

PyAudio-0.2.13-cp311-cp311-linux_x86_64.whl

PyAudio-0.2.13-cp311-cp311-macosx_10_9_universal2.whl

PyAudio-0.2.13-cp311-cp311-win_amd64.whl

PyAudio-0.2.14-cp310-cp310-linux_x86_64.whl

PyAudio-0.2.14-cp310-cp310-macosx_10_9_universal2.whl

PyAudio-0.2.14-cp310-cp310-macosx_11_0_x86_64.whl

PyAudio-0.2.14-cp310-cp310-macosx_12_0_x86_64.whl

PyAudio-0.2.14-cp310-cp310-win_amd64.whl

PyAudio-0.2.14-cp311-cp311-linux_x86_64.whl

PyAudio-0.2.14-cp311-cp311-macosx_10_9_universal2.whl

PyAudio-0.2.14-cp311-cp311-win_amd64.whl

PyAudio-0.2.14-cp312-cp312-linux_x86_64.whl

PyAudio-0.2.14-cp312-cp312-macosx_10_13_universal2.whl

PyAudio-0.2.14-cp312-cp312-macosx_10_9_universal2.whl

PyAudio-0.2.14-cp312-cp312-win_amd64.whl

PyAudio-0.2.14-cp313-cp313-linux_x86_64.whl

PyAudio-0.2.14-cp313-cp313-macosx_10_13_universal2.whl

下载:上述内容均在压缩包内,适用PYTHON3.10,PYTHON3.11,PYTHON3.12版本,选择对应的CP310,CP311,CP312即可,选择时请按自己的操作系统选择,并先安装对应的PYTHON版本。

示例

wheel文件拷贝到Scripts文件夹,执行:
pip install C:\Users\easyb\AppData\Local\Programs\Python\Python312\Scripts\PyAudio-0.2.14-cp312-cp312-win_amd64.whl
文件夹为PIP路径,文件名同你选择的WHEEL文件。
上述适用WINDOWS版本,并安装PYTHON3.12。


http://www.mrgr.cn/news/75272.html

相关文章:

  • 【C++学习(37)】并发性模式:如生产者-消费者、读写锁等。 架构模式:如MVC、MVVM等。属于23 种设计模式吗? RAII 的关系?
  • 【Python进阶】Python中的数据库交互:ORM技术与SQLAlchemy
  • css-50 Projects in 50 Days(4)
  • Python →爬虫实践
  • AI 大模型应用:AI开发的捷径工作流模式
  • Redis增删改查、复杂查询案例分析
  • 【Nginx】反向代理Https时相关参数:
  • Java函数式编程学习笔记
  • 子网划分学习
  • JVM详解:类的加载过程
  • 2023_Spark_实验十五:SparkSQL进阶操作
  • SpringCloud Gateway网关路由配置 接口统一 登录验证 权限校验 路由属性
  • 日志:中文 URI 参数乱码之 encodeURI、encodeURIComponent、escape 作为 Ajax 中文参数编码给 ASP 的记录
  • 爆肝线程池底层源码,高并发精进之路!
  • 相交链表
  • 曹操为什么总是亲征
  • 1050 String Subtraction (20)
  • C++笔记
  • 多模态大模型(2)--BLIP
  • 【电子设计】按键LED控制与FreeRTOS
  • NGUI————按钮练习题
  • Towards Reasoning in Large Language Models: A Survey
  • Spring加载流程,Springboot自动装配原理
  • android开发
  • exo - 使用日常设备运行AI集群
  • 2024年09月CCF-GESP编程能力等级认证Python编程一级真题解析