Description
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/grpc/requirements.txt
Did you change the file? If so, how?
No
Describe the issue
This is a sequel of the issues #723 that was closed 2 days back. I could have added this under same issue had it not been closed as both issues are related. #723 is about compiler errors occurred during running pip install -r requirements.txt
.
This issue is about what we have observed when the requirements were installed in NAO Robot. We got into few issues as emerge
package manager is not available in the NAO OS (supposed to be similar to opennao VM).
These are the steps followed in the installation.
- Check
pip
version =9.0.1 - OK - Install
virtualenv
- OK - Install
portaudio
usingemerge
– Fail as emerge is not available in usr/bin - Install
pyaudio
usingemerge
– Not Started yet - Install package as per requirements.txt
grpcio==1.0.4
– Not Started yet
PyAudio==0.2.9
– Not Started yet
grpc-google-cloud-speech-v1beta1==0.14.0
– Not Started yet
six==1.10.0
– Not Started yet
requests==2.12.4
– Not Started yet
google-auth==0.5.0
– Not Started yet python transcribe_streaming.py
– Not Started yet.
Then we copied the portaudio
library (portaudio-19_pre20071207.tbz2) from opennao vm to Robot and ran pip install
.
(env) nao [0] ~/googlespeech $ pip install -r requirements.txt
Collecting PyAudio==0.2.9 (from -r requirements.txt (line 2))
/var/persistent/home/nao/googlespeech/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/var/persistent/home/nao/googlespeech/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached PyAudio-0.2.9.tar.gz
Building wheels for collected packages: PyAudio
Running setup.py bdist_wheel for PyAudio ... error
Complete output from command /var/persistent/home/nao/googlespeech/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-build-SqC1D8/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 /tmp/tmp4BLE1Upip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
copying src/pyaudio.py -> build/lib.linux-i686-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/src
i686-pc-linux-gnu-gcc -pthread -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-i686-2.7/src/_portaudiomodule.o
unable to execute i686-pc-linux-gnu-gcc: No such file or directory
error: command 'i686-pc-linux-gnu-gcc' 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 /var/persistent/home/nao/googlespeech/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-build-SqC1D8/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 /tmp/pip-dluM0A-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/persistent/home/nao/googlespeech/env/include/site/python2.7/PyAudio:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
copying src/pyaudio.py -> build/lib.linux-i686-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/src
i686-pc-linux-gnu-gcc -pthread -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-i686-2.7/src/_portaudiomodule.o
unable to execute i686-pc-linux-gnu-gcc: No such file or directory
error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/var/persistent/home/nao/googlespeech/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-build-SqC1D8/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 /tmp/pip-dluM0A-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/persistent/home/nao/googlespeech/env/include/site/python2.7/PyAudio" failed with error code 1 in /var/volatile/tmp/pip-build-SqC1D8/PyAudio/
Ignoring this error (should not have been done) we ran the python transcribe_streaming.py
and ended up getting below error.
We checked if PyAudio
version is correct using pip freeze
and found the following packages present in Robot.
(env) nao [err 1] ~/googlespeech $ pip freeze
enum34==1.1.6
futures==3.0.5
google-auth==0.5.0
googleapis-common-protos==1.5.0
grpc-google-cloud-speech-v1beta1==0.14.0
grpcio==1.0.4
httplib2==0.9.2
oauth2client==3.0.0
protobuf==3.1.0.post1
pyasn1==0.1.9
pyasn1-modules==0.0.8
requests==2.12.4
rsa==3.4.2
six==1.10.0
My question is how to run pip install -r requirements.txt
without an error so that PyAudio is installed properly. And I hope it will solve this issue. Appreciate any support.