1

pip install pyaudio failed on MacOS with error src/_portaudiomodule.c:27:19: fatal error: stdio.h: No such file or directory #include <stdio.h>

After doing some research I ran the following commands:

1/ export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/

2/ pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio

But got errors /usr/local/include/portaudio.h:114:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] and error: command 'gcc' failed with exit status 1 instead.

It seems upgrading to MacOS Catalina messed up my Xcode Developer Tools C headers but am not able to resolve it.

John
  • 11
  • 1
  • 2

1 Answers1

0

i was able to solve this by copying portaudio.h from /usr/local/include/ to anaconda3/include.

John
  • 11
  • 1
  • 2