几天在跑python的vad程序的时候,出现了下面的问题:
(base) ➜ python-vad git:(master) python vad.py
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "vad.py", line 10, in <module>
import pyaudio
File "/Users/admin/anaconda3/lib/python3.7/site-packages/pyaudio.py", line 116, in <module>
import _portaudio as pa
ImportError: dlopen(/Users/admin/anaconda3/lib/python3.7/site-packages/_portaudio.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/portaudio/lib/libportaudio.2.dylib
Referenced from: /Users/admin/anaconda3/lib/python3.7/site-packages/_portaudio.cpython-37m-darwin.so
Reason: image not found
解决方法
conda install pyaudio
参考文献
[1]. Python package installation issues: PyAudio, PortAudio. https://stackoverflow.com/questions/51992375/python-package-installation-issues-pyaudio-portaudio