Unable to install pyaudio on osx lion

余生长醉 提交于 2019-12-01 06:19:15

问题


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.


回答1:


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)



来源:https://stackoverflow.com/questions/9634478/unable-to-install-pyaudio-on-osx-lion

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!