pyaudio error


Scott-N5HUM
 

While installing pip3 install pyaudio I get errors, I don't know what information you need from me to help troubleshoot, so I'm just going to give you some basics and hope it enough.

MacOS Big Sur

And here is the error I am getting

Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"'; __file__='"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-wheel-9cqmyxy8
       cwd: /private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/
  Complete output (13 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11-x86_64-3.9
  copying src/pyaudio.py -> build/lib.macosx-11-x86_64-3.9
  running build_ext
  building '_portaudio' extension
  creating build/temp.macosx-11-x86_64-3.9
  creating build/temp.macosx-11-x86_64-3.9/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DMACOSX=1 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-11-x86_64-3.9/src/_portaudiomodule.o
  clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11'
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  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:
     command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"'; __file__='"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-record-v1es6l4d/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/pyaudio
         cwd: /private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/
    Complete output (13 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-11-x86_64-3.9
    copying src/pyaudio.py -> build/lib.macosx-11-x86_64-3.9
    running build_ext
    building '_portaudio' extension
    creating build/temp.macosx-11-x86_64-3.9
    creating build/temp.macosx-11-x86_64-3.9/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DMACOSX=1 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-11-x86_64-3.9/src/_portaudiomodule.o
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11'
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"'; __file__='"'"'/private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-install-zmgy9yaz/pyaudio_8560109972a04a4f8e84b168761fd52d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/wd/ybl4w0v11l550xn89_ybzhxm0000gn/T/pip-record-v1es6l4d/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/pyaudio Check the logs for full command output.

Join main@DVSwitch.groups.io to automatically receive all group messages.