Termux-packages: install pyaudio returns error code 1

Created on 17 Oct 2018  路  14Comments  路  Source: termux/termux-packages

Hi,
my android is 8.1

`$ pip3 install pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
Running setup.py bdist_wheel for pyaudio ... error
Complete output from command /data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-5s_xs9y6/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /data/data/com.termux/files/usr/tmp/pip-wheel-obtv_zyg --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv8l-3.6
copying src/pyaudio.py -> build/lib.linux-armv8l-3.6
running build_ext
building '_portaudio' extension
creating build/temp.linux-armv8l-3.6
creating build/temp.linux-armv8l-3.6/src
arm-linux-androideabi-clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -fPIC -I/data/data/com.termux/files/usr/include/python3.6m -c src/_portaudiomodule.c -o build/temp.linux-armv8l-3.6/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~
1 error generated.
error: command 'arm-linux-androideabi-clang' failed with exit status 1


Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
Complete output from command /data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-5s_xs9y6/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 /data/data/com.termux/files/usr/tmp/pip-record-5bw8i90a/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv8l-3.6
copying src/pyaudio.py -> build/lib.linux-armv8l-3.6
running build_ext
building '_portaudio' extension
creating build/temp.linux-armv8l-3.6
creating build/temp.linux-armv8l-3.6/src
arm-linux-androideabi-clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -fPIC -I/data/data/com.termux/files/usr/include/python3.6m -c src/_portaudiomodule.c -o build/temp.linux-armv8l-3.6/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~
1 error generated.
error: command 'arm-linux-androideabi-clang' failed with exit status 1

----------------------------------------

Command "/data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-5s_xs9y6/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 /data/data/com.termux/files/usr/tmp/pip-record-5bw8i90a/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-5s_xs9y6/pyaudio/`

All 14 comments

Port audio is not available in main repo. It is available in mine.

Port audio is not available in main repo. It is available in mine.

can u tell me how should i install this ?

https://wiki.termux.com/wiki/Package_Management

sry , i don't know anything about this.
can u give me commands ?

sry , i don't know anything about this.

You can't read ? On page https://wiki.termux.com/wiki/Package_Management everything that you need:

pkg install wget
$PREFIX/bin/wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh

sry , i don't know anything about this.

You can't read ? On page https://wiki.termux.com/wiki/Package_Management everything that you need:

pkg install wget
$PREFIX/bin/wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh

i installed ,what should i do after this ?
i have same error.

pkg install portaudio portaudio-dev

pkg install portaudio portaudio-dev

Thanks

sorry, 1 more question
how can i give microphone Permission to termux ?

sorry, 1 more question
how can i give microphone Permission to termux ?

You can record stuff through termux-api.
Search github for microphone and you'll find older PRs/issues discussing this.

i installed termux-api. and i gave permission to termux-api.
Why is my output so?

import speech_recognition as sr

sr.Microphone.list_microphone_names()

['OpenSL ES Output', 'Monitor of OpenSL ES Output']

@Grimler91 could u please reopen this issue?

This issue is solved. Portaudio was needed, which is provided by its-pointless' repo.

The very short output you wrote doesn't seem to the related to the original issue

I had to install cmake and python-dev
pkg install cmake python-dev wget
wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
pkg install portaudio portaudio-dev
pip3 install pyaudio

This is the whole process

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thurask picture thurask  路  3Comments

newmania picture newmania  路  3Comments

Cyb3rD3m0n picture Cyb3rD3m0n  路  3Comments

Zuccace picture Zuccace  路  3Comments

zejji picture zejji  路  4Comments