I am trying to install PyAudio
inside my webfaction
server.
It gives me the following error. I got the same error while installing it locally but I read the solution and the sudo
command solves it. The problem is webfaction
does not allow the sudo
command.
What I have tried is that I copied my pyaudio
local installation from site-packages folder to my online production server.
If I do pip freeze it shows me that it is installed. I tried running my function which uses PyAudio
but it gives me the error
" Could not find PyAudio.Check installation"
EDIT 1:
The following code is going to solve the problem of installing port audio and pyaudio on web faction:
export CPPFLAGS="-I$HOME/include $CPPFLAGS"
export LDFLAGS="-L$HOME/lib $LDFLAGS"
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
mkdir src
cd src
wget http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
git clone https://people.csail.mit.edu/hubert/git/pyaudio.git
tar -xf pa_stable_v190600_20161030.tgz
cd portaudio
./configure --prefix=$HOME
make
make install
cd ../pyaudio/
python2.7 setup.py install --prefix=$HOME
You can change the version of python to the version you currently have. I had 2.7 so I changed to it.
EDIT2:
This installs pyaudio and port audio. The problem is that I am still getting an error, "Pyaudio installation not found"
. Was there any error installing port audio or they have not been installed correctly?
EDIT3:
I figured out something that if you open the django shell inside and type import pyaudio. You will get the following error.
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/ammarkhan123/lib/python2.7/pyaudio.py", line 116, in <module>
import _portaudio as pa
ImportError: No module named _portaudio