我正在尝试通过命令“ pip3 install pyaudio
”在安装具有python 64位的Mac中安装pyaudio,方法是出现以下错误。
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/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 /private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-record-0v8uniq2/install-record.txt --single-version-externally-managed --compile --install-headers '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include/site/python3.7/pyaudio'
cwd: /private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.7
copying src/pyaudio.py -> build/lib.macosx-10.15-x86_64-3.7
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.15-x86_64-3.7
creating build/temp.macosx-10.15-x86_64-3.7/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DMACOSX=1 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_portaudiomodule.c -o build/temp.macosx-10.15-x86_64-3.7/src/_portaudiomodule.o
src/_portaudiomodule.c:27:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/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 /private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-record-0v8uniq2/install-record.txt --single-version-externally-managed --compile --install-headers '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include/site/python3.7/pyaudio' Check the logs for full command output.
我尝试了以下解决方案,但没有一个可以帮助我成功安装软件包。
是否有建议成功安装软件包?