可以在Pycharm上安装Pyaudio

发布于 2025-01-23 15:33:47 字数 3227 浏览 1 评论 0原文

因此,我已经与Pycharm上下载Pyaudio。下载时,我会遇到一个错误:“安装软件包'Pyaudio'时发生

Collecting PyAudio
 Using cached PyAudio-0.2.11.tar.gz (37 kB)
 Preparing metadata (setup.py): started
 Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: PyAudio
 Building wheel for PyAudio (setup.py): started
 Building wheel for PyAudio (setup.py): finished with status 'error'
 Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
 Running setup.py install for PyAudio: started
 Running setup.py install for PyAudio: finished with status 'error'

 error: subprocess-exited-with-error
 
 python setup.py bdist_wheel did not run successfully.
 exit code: 1
 
 [14 lines of output]
 running bdist_wheel
 running build
 running build_py
 creating build
 creating build\lib.win-amd64-3.10
 copying src\pyaudio.py -> build\lib.win-amd64-3.10
 warning: build_py: byte-compiling is disabled, skipping.
 
 running build_ext
 creating build\temp.win-amd64-3.10
 creating build\temp.win-amd64-3.10\Release
 creating build\temp.win-amd64-3.10\Release\src
 cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\Pirnar\PycharmProjects\pythonProject\venv\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
 error: command 'cl.exe' failed: None
 [end of output]
 
 note: This error originates from a subprocess, and is likely not a problem with pip.
 ERROR: Failed building wheel for PyAudio
 error: subprocess-exited-with-error
 
 Running setup.py install for PyAudio did not run successfully.
 exit code: 1
 
 [16 lines of output]
 running install
 C:\Users\Pirnar\PycharmProjects\pythonProject\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
   warnings.warn(
 running build
 running build_py
 creating build
 creating build\lib.win-amd64-3.10
 copying src\pyaudio.py -> build\lib.win-amd64-3.10
 warning: build_py: byte-compiling is disabled, skipping.
 
 running build_ext
 creating build\temp.win-amd64-3.10
 creating build\temp.win-amd64-3.10\Release
 creating build\temp.win-amd64-3.10\Release\src
 cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\Pirnar\PycharmProjects\pythonProject\venv\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
 error: command 'cl.exe' failed: None
 [end of output]
 
 note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

PyAudio

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

错误

pip install pipwin
pipwin install pyaudio

。 。

我正在使用Windows 10 Pro,Python 3.10和Pycharm社区版2022.1 我该怎么办?

So I've tied to download PyAudio on PyCharm. When it's downloading I get an error: "Error occurred when installing package 'PyAudio'. Details..." When I click "Details" I get:

Collecting PyAudio
 Using cached PyAudio-0.2.11.tar.gz (37 kB)
 Preparing metadata (setup.py): started
 Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: PyAudio
 Building wheel for PyAudio (setup.py): started
 Building wheel for PyAudio (setup.py): finished with status 'error'
 Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
 Running setup.py install for PyAudio: started
 Running setup.py install for PyAudio: finished with status 'error'

 error: subprocess-exited-with-error
 
 python setup.py bdist_wheel did not run successfully.
 exit code: 1
 
 [14 lines of output]
 running bdist_wheel
 running build
 running build_py
 creating build
 creating build\lib.win-amd64-3.10
 copying src\pyaudio.py -> build\lib.win-amd64-3.10
 warning: build_py: byte-compiling is disabled, skipping.
 
 running build_ext
 creating build\temp.win-amd64-3.10
 creating build\temp.win-amd64-3.10\Release
 creating build\temp.win-amd64-3.10\Release\src
 cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\Pirnar\PycharmProjects\pythonProject\venv\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
 error: command 'cl.exe' failed: None
 [end of output]
 
 note: This error originates from a subprocess, and is likely not a problem with pip.
 ERROR: Failed building wheel for PyAudio
 error: subprocess-exited-with-error
 
 Running setup.py install for PyAudio did not run successfully.
 exit code: 1
 
 [16 lines of output]
 running install
 C:\Users\Pirnar\PycharmProjects\pythonProject\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
   warnings.warn(
 running build
 running build_py
 creating build
 creating build\lib.win-amd64-3.10
 copying src\pyaudio.py -> build\lib.win-amd64-3.10
 warning: build_py: byte-compiling is disabled, skipping.
 
 running build_ext
 creating build\temp.win-amd64-3.10
 creating build\temp.win-amd64-3.10\Release
 creating build\temp.win-amd64-3.10\Release\src
 cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\Pirnar\PycharmProjects\pythonProject\venv\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pirnar\AppData\Local\Programs\Python\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
 error: command 'cl.exe' failed: None
 [end of output]
 
 note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

PyAudio

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I have tried downloadin it by typing this in to terminal

pip install pipwin
pipwin install pyaudio

Also I have downloaded C++ Build tools.

I am using windows 10 pro, python 3.10 and pycharm community edition 2022.1
What do I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风吹过旳痕迹 2025-01-30 15:33:47

这是一个众所周知的问题,解决方案已经在官方文档

This is a well-known problem and the solution is already in the official docs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文