Pyaudio library .Install.
-
@JESUS-MARTINEZ said in Pyaudio library .Install.:
src/_portaudiomodule.c:28:20: fatal error: Python.h: No such file or directory
It needs the python development header files. I don't know if they are available to be installed on the Omega2 directly..
Could you try
opkg update && opkg install python-dev
please. Or directly thepython-dev_2.7.14-5_mipsel_24kc.ipk
file from http://repo.onion.io/omega2/packages/packages/. (wget .. && opkg install ...
)
-
I have installed:
python - 2.7.14-5
python-base - 2.7.14-5
python-codecs - 2.7.14-5
python-compiler - 2.7.14-5
python-ctypes - 2.7.14-5
python-db - 2.7.14-5
python-decimal - 2.7.14-5
python-dev - 2.7.14-5
python-distutils - 2.7.14-5
python-email - 2.7.14-5
python-gdbm - 2.7.14-5
python-lib2to3 - 2.7.14-5
python-light - 2.7.14-5
python-logging - 2.7.14-5
python-multiprocessing - 2.7.14-5
python-ncurses - 2.7.14-5
python-openssl - 2.7.14-5
python-pip - 8.1.2-1
python-pydoc - 2.7.14-5
python-pyserial - 3.1.1-1
python-setuptools - 27.2.0-1
python-sqlite3 - 2.7.14-5
python-unittest - 2.7.14-5
python-xml - 2.7.14-5When execute python setup.py install:
Thanksrunning build_ext
building '_portaudio' extension
mipsel-openwrt-linux-musl-gcc -fno-strict-aliasing -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mno-mips16 -mno-interlink-mips16 -iremap /root/source/build_dir/target-mipsel_24kc_musl-1.1.16/Python-2.7.14:Python-2.7.14 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mno-mips16 -mno-interlink-mips16 -iremap /root/source/build_dir/target-mipsel_24kc_musl-1.1.16/Python-2.7.14:Python-2.7.14 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-mips-2.7/src/_portaudiomodule.o
In file included from /usr/include/python2.7/Python.h:8:0,
from src/_portaudiomodule.c:28:
/usr/include/python2.7/pyconfig.h:1215:0: warning: "_XOPEN_SOURCE" redefined
#define _XOPEN_SOURCE 600
^
In file included from /usr/include/stdio.h:8:0,
from src/_portaudiomodule.c:27:
/usr/include/features.h:12:0: note: this is the location of the previous definition
#define _XOPEN_SOURCE 700
^
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
compilation terminated.
error: command 'mipsel-openwrt-linux-musl-gcc' failed with exit status 1
root@Omega-138B:/www/a/PyAudio-0.2.11#
-
Now it's missing the portaudio library (
portaudio_19
). The repo only seems to have the binaries (libportaudio.so.2
) at http://repo.onion.io.s3.amazonaws.com/omega2/packages/packages/portaudio_19_20140130-1_mipsel_24kc.ipk but no development headers (i.e.portaudio.h
).This is the part where you either (1) cross-compile from a virtual machine or (2) try something hacky.
For (2):
opkg install portaudio_19
(orportaudio-19
if that fails)- download the header files, aka
pa_stable_v190600_20161030.tgz
from http://www.portaudio.com/download.html; extract the contents of theinclude/
folder (which contains theportaudio.h
to/usr/include
- make sure it's found by gcc on one of its
-I
flags, modifysetup.py
if needed
Are you actually sure you want to use
pyaudio
which does OSS? Because I've been using ALSA in my project (which worked fine); So maybe https://github.com/larsimmisch/pyalsaaudio is the right package for you. But that one also requires you to compile one file which needs the ALSA development headers
-
Hello,I have installed PorAudio
php7-mod-xml - 7.1.1-1
portaudio - 19_20140130-1In file included from /usr/include/python2.7/Python.h:8:0,
from src/_portaudiomodule.c:28:
/usr/include/python2.7/pyconfig.h:1212:0: warning: "_XOPEN_SOURCE" redefined
#define _XOPEN_SOURCE 600
^
In file included from /usr/include/stdio.h:8:0,
from src/_portaudiomodule.c:27:
/usr/include/features.h:12:0: note: this is the location of the previous definition
#define _XOPEN_SOURCE 700
I copied portaudio.h to usr / include:
New Error:
Very Thanks for help memipsel-openwrt-linux-musl-gcc -shared -L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/lib -L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -znow -zrelro -L/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/Python-2.7.14 build/temp.linux-mips-2.7/src/_portaudiomodule.o -L/usr/lib -lportaudio -lpython2.7 -o build/lib.linux-mips-2.7/_portaudio.so
/usr/bin/ld: cannot find -lportaudio
collect2: error: ld returned 1 exit status
error: command 'mipsel-openwrt-linux-musl-gcc' failed with exit status 1
root@Omega-138B:/www/a/PyAudio-0.2.11#I want to use ibm watson with python and this library requires me. PyAudio
I really need a method that allows me to pick up the speech to text and I was going to use its API.
Do you know any other method to collect voice to text in real time?
-
@JESUS-MARTINEZ said in Pyaudio library .Install.:
/usr/bin/ld: cannot find -lportaudio
Well, getting closer.
Is
libportaudio.so.*
inside/usr/lib
? If not copy it there. It should be somewhere on the system given that you've installedportaudio
. Do afind / -name "libport*"
if needed to find it.
-
Yes its installed.How repair library Maximilian?
/usr/bin/ld: cannot find -lportaudio????root@Omega-138B:/www/a/PyAudio-0.2.11# find / -name "libport*"
/overlay/upper/usr/lib/libportaudio.so.2
/overlay/upper/usr/lib/libportaudio.so.2.0.0
/usr/lib/libportaudio.so.2
/usr/lib/libportaudio.so.2.0.0
root@Omega-138B:/www/a/PyAudio-0.2.11#mipsel-openwrt-linux-musl-gcc -shared -L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/lib -L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -znow -zrelro -L/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/Python-2.7.14 build/temp.linux-mips-2.7/src/_portaudiomodule.o -L/usr/lib -lportaudio -lpython2.7 -o build/lib.linux-mips-2.7/_portaudio.so
/usr/bin/ld: cannot find -lportaudio
collect2: error: ld returned 1 exit status
error: command 'mipsel-openwrt-linux-musl-gcc' failed with exit status 1
-
Execute the following command:
ln -s /usr/lib/libportaudio.so.2 /usr/lib/libportaudio.so
and retry. (Creates a symlink from/usr/lib/libportaudio.so
->/usr/lib/libportaudio.so.2
)
-
hello,
seems to install maximilian but when I want to use it, the following error appears
Expression 'ioctl( devHandle, SNDCTL_DSP_SPEED, &sr )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 421
Any ideas
Many thanks
-
What example code are you running and which sound card do you have installed? (I2S or some USB card?)
-
when i try to install pyaudio in my windows, it just shows me the error..someone please helpme.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\ASUS\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-r3240l1b\pyaudio\setup.py'"'"'; file='"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-r3240l1b\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ASUS\AppData\Local\Temp\pip-record-x7pysoqy\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\ASUS\AppData\Local\Temp\pip-install-r3240l1b\pyaudio
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DMS_WIN64=1 -IC:\Users\ASUS\AppData\Local\Programs\Python\Python37\include -IC:\Users\ASUS\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\Users\ASUS\AppData\Local\Programs\Python\Python37\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\ASUS\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-r3240l1b\pyaudio\setup.py'"'"'; file='"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-r3240l1b\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ASUS\AppData\Local\Temp\pip-record-x7pysoqy\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
-
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-install-h86rj64o/pyaudio/setup.py'"'"'; file='"'"'/private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-install-h86rj64o/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-record-0kpilvzw/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio
cwd: /private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-install-h86rj64o/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.8
running build_ext
building 'portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-install-h86rj64o/pyaudio/setup.py'"'"'; file='"'"'/private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-install-h86rj64o/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/3_/b5ly9sbs7hz_t7jhr3vlsm740000gn/T/pip-record-0kpilvzw/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio Check the logs for full command output.