I am able to successfully install portaudio and pyaudio but when I do the following I get an error:
import pyaudio
The error is:
>>> import pyaudio
Could not import the PyAudio C module 'pyaudio._portaudio'.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/username/opt/anaconda3/envs/S2T/lib/python3.8/site-packages/pyaudio/__init__.py", line 111, in <module>
import pyaudio._portaudio as pa
ImportError: dlopen(/Users/username/opt/anaconda3/envs/S2T/lib/python3.8/site-packages/pyaudio/_portaudio.cpython-38-darwin.so, 2): Symbol not found: _PaMacCore_SetupChannelMap
Referenced from: /Users/username/opt/anaconda3/envs/S2T/lib/python3.8/site-packages/pyaudio/_portaudio.cpython-38-darwin.so
Expected in: flat namespace
in /Users/username/opt/anaconda3/envs/S2T/lib/python3.8/site-packages/pyaudio/_portaudio.cpython-38-darwin.so
I have an M1 mac(Big Sur). Tried on python 3.6, 3.8 and 3.9 version I have tried all steps from various stackoverflow thread but still get the same error. Any help is appreciated. Thank you
Threads tried: pyaudio could not import _portaudio Unable to install PyAudio on M1 Mac [PortAudio already installed]