2013-10-15 83 views
0

我嘗試安裝pyaudio運行以下PortAudio找不到符號:_PaMacCore_SetupChannelMap在山獅

brew install portaudio 

[pip or easy_install command] 
sudo pip install pyaudio 

sudo easy_install pyaudio 

然而,當我在Python運行進口_portaudio inerpreter它給了我這個

(easy_install的都與點子,並試圖)
>>> import _portaudio 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: dlopen(/Library/Python/2.7/site-packages/PyAudio-0.2.7-py2.7-macosx-10.8-intel.egg/_portaudio.so, 2): Symbol not found: _PaMacCore_SetupChannelMap 
    Referenced from: /Library/Python/2.7/site-packages/PyAudio-0.2.7-py2.7-macosx-10.8-intel.egg/_portaudio.so 
    Expected in: flat namespace 
in /Library/Python/2.7/site-packages/PyAudio-0.2.7-py2.7-macosx-10.8-intel.egg/_portaudio.so 

回答

1

您的路徑設置是否正確以查找端口音頻dll文件?是否已經存在依賴關係:pyPortAudio/fastaudio還是需要單獨安裝?

順便說一句:這可能會或可能不符合您的要求,但你有沒有考慮過使用scipy.io.wavfile?

import scipy.io.wavfile 
fs1, y1 = scipy.io.wavfile.read(filename) 
+0

我沒有也因爲我需要它是得到訪問麥克風(以及OpenCV的攝像頭)。我終於真的得到它與macports安裝。現在課程OpenCV macports版本不想導入,但我會解決它 – Zimm3r

1

我從使用蘋果的python移動到使用macports python27,然後安裝pyaudio與。