I am trying to write a python script that will record some sound when called from a browser. I am using XAMPP on my macbook pro as a test server. Pyaudio is the package I am using to collect the sound samples. I ran the installer for it and can import and utilize it just fine but when the script is executed by apache, the import fails. I can import standard packages fine however.
When apache runs this script:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
import sys
import cgitb
cgitb.enable()
print "Content-Type: text/plain;charset=utf-8"
print
import pyaudio
I get this error in the browser: Please build and install the PortAudio Python bindings first.
Running this in the shell however is not a problem.
I have tried changing to the hashbang heading to the exact location of my shell interpreter but that made no difference.