I'm using visual studio code python and trying to install pyaudio for speech recognition but it won't work. I've tried everything I could find on the internet but still won't work. This is the error I get:
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Users/(myname)/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-install-x169uf9a/pyaudio_e3aaab579ae54e1f8536fa48ae519726/setup.py'"'"'; __file__='"'"'/private/var/folders/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-install-x169uf9a/pyaudio_e3aaab579ae54e1f8536fa48ae519726/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/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-record-rbu8r5rx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/(myname)/.venv/include/site/python3.8/pyaudio
cwd: /private/var/folders/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-install-x169uf9a/pyaudio_e3aaab579ae54e1f8536fa48ae519726/
Complete output (104 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
copying src/pyaudio.py -> build/lib.macosx-10.14.6-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic - error: Unsupported architecture
#error Unsupported architecture
^
In file included from src/_portaudiomodule.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from src/_portaudiomodule.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from src/_portaudiomodule.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from src/_portaudiomodule.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
In file included from src/_portaudiomodule.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:32:9: error: unknown type name '__darwin_va_list'
typedef __darwin_va_list va_list;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/(myname)/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-install-x169uf9a/pyaudio_e3aaab579ae54e1f8536fa48ae519726/setup.py'"'"'; __file__='"'"'/private/var/folders/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-install-x169uf9a/pyaudio_e3aaab579ae54e1f8536fa48ae519726/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/yr/ry42mhc57zx6rwv743hcd3cm0000gn/T/pip-record-rbu8r5rx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/(myname)/.venv/include/site/python3.8/pyaudio Check the logs for full command output.
It seems like a bunch of random code and I'm fairly new self-taught so I'm very lost. I tried using brew as well which I saw a lot of people saying to do but that didn't work either. Please if anyone could help that would be great :))