3

I'd like to install pyaudio on osx lion but i'm unable to do it. Everytime i try with the pkg, it doesn't install anything. When i try to install it with pip i have the following error (among a lot of other lines) :

lipo: can't open input file: /var/folders/11/gfpzwjdd6dj7hbz7dpbvx9y40000gn/T//ccYnQM1k.out (No such file or directory)

error: command '/usr/bin/llvm-gcc' failed with exit status 1

If anyone can help me, thank you.

  • I too had similar problems. Try this [http://stackoverflow.com/questions/12921406/mac-10-4-sdk-in-mountain-lion/12922354#12922354][1] [1]: http://stackoverflow.com/questions/12921406/mac-10-4-sdk-in-mountain-lion/12922354#12922354 – VeilEclipse Oct 18 '12 at 14:31

1 Answers1

5

I had to manually install it to get anything working. You'll need the source distributions for both pyaudio and portaudio.

Firstly I installed portaudio with MacPorts (not from the source distribution):

sudo port install portaudio

pyaudio then refused to install as it couldn't find the pa_mac_core.h and portaudio.h headers. After copying these from the portaudio source distribution include folder into pyaudio's src folder, I had to uncomment line 49 of pa_mac_core.h:

#include <AudioToolbox/AudioToolbox.h>

Doing this allowed me to get pyaudio to install using a simple

sudo python setup.py install

(I probably didn't need superuser for the portaudio install, but pyaudio wouldn't install unless I did it as a superuser)

grundyoso
  • 2,329
  • 1
  • 15
  • 13
Matthew Henry
  • 189
  • 2
  • 6
  • After days of futzing around with portaudio/pyaudio, this answer is what helped me out. This works in a virtualenv even when the env does not see the portaudio installation. PyAudio only needs these header files during install. I did not have to comment out `#include ` – tim-phillips Mar 03 '14 at 23:23
  • 1
    This worked for me, no hacking around the pyaudio source: https://gist.github.com/jiaaro/9767512210a1d80a8a0d – Jiaaro Nov 05 '14 at 20:20
  • same here http://stackoverflow.com/questions/33513522/when-installing-pyaudio-pip-cannot-find-portaudio-h-in-usr-local-include – Jonathan Hendler May 31 '16 at 18:29