Question

I tried installing pyaudio (tried both with pip and easy_install) by running the following

brew install portaudio

[pip or easy_install command]
sudo pip install pyaudio

sudo easy_install pyaudio

However when I run import _portaudio in the python inerpreter it gives me this

>>> 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
Was it helpful?

Solution

Is your path setup right to find the port audio dll file? Does the dependency come already: pyPortAudio/fastaudio or does it require a separate install?

BTW: This might or might not meet your requirements but have you considered using scipy.io.wavfile?

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

OTHER TIPS

I moved from using apple's python to using macports python27 and then installed pyaudio with that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top