当我运行pyaudio程序时,我得到了这个错误,我怎么解决这个问题

时间:2016-04-26 05:48:31

标签: python pyaudio portaudio

我收到了错误

Could not import the PyAudio C module '_portaudio'. Traceback (most recent call last): File "/Users/huangjinxue/Documents/python/workspace/pyMusic/music-pyaudio.py", line 2, in <module> import pyaudio File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyaudio.py", line 116, in <module> import _portaudio as pa ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_portaudio.so, 2): Symbol not found: _PaMacCore_SetupChannelMap Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_portaudio.so Expected in: dynamic lookup

我如何解决它,我想使用pyaudio播放音乐列表

1 个答案:

答案 0 :(得分:0)

我猜测你在OS-X或Linux上的错误消息 - 在任何一种情况下你都对PortAudio包有一个未满足的依赖。

您需要从软件包管理器安装它,或者下载,构建和安装;从here安装。