L
L
lubaznatel2021-10-18 13:09:27
Python
lubaznatel, 2021-10-18 13:09:27

What to do if it gives an error when downloading pyaudio that Portaudio.h was not found (portaudio is installed)?

Xcode and homebrew,portaudio. installed
here is the whole error what to do?
I'm on a mac. (I'll ask for a detailed explanation)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-install-srsikqhb/pyaudio_9372cb12844e4bebba55060524e3b06c/setup.py'"'"'; __file__='"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-install-srsikqhb/pyaudio_9372cb12844e4bebba55060524e3b06c/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'"'"', '"'
cwd: /private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-install-srsikqhb/pyaudio_9372cb12844e4bebba55060524e3b06c/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x.
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.9
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9 /src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework /Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.9/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: ' portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
---------------------------------- ------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-install-srsikqhb/pyaudio_9372cb12844e4bebba55060524e3b06c/setup.py'"'"'; __file__='"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-install-srsikqhb/pyaudio_9372cb12844e4bebba55060524e3b06c/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'"'
[email protected] ~ % pip3 install /Users/vitalijfrolov/Desktop/IT/PyAudio-0.2.11.tar.gz
Processing ./Desktop/IT/PyAudio-0.2.11.tar.gz
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-req-build-veogj__1/setup.py'"'"'; __file__='"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-req-build-veogj__1/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__,
cwd: /private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-req-build-veogj__1/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.9
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9 /src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework /Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.9/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: ' portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
---------------------------------- ------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-req-build-veogj__1/setup.py'"'"'; __file__='"'"'/private/var/folders/fr/r2zl20f955sd6t92h04b47s40000gn/T/pip-req-build-veogj__1/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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexbprofit, 2021-10-18
@alexbprofit

brew install portaudio
How to solve pyaudio installation problem on mac os

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question