Unable to install pyaudio on osx lion

后端 未结 1 661
无人及你
无人及你 2021-01-14 07:16

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 f

相关标签:
1条回答
  • 2021-01-14 07:33

    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)

    0 讨论(0)
提交回复
热议问题