Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech sample failed to install #2061

Closed
harin opened this issue Mar 20, 2019 · 2 comments
Closed

Speech sample failed to install #2061

harin opened this issue Mar 20, 2019 · 2 comments

Comments

@harin
Copy link

harin commented Mar 20, 2019

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/speech/cloud-client

Did you change the file? If so, how?

No

Describe the issue

Failed to install requirements.txt

Steps:

  1. Open Cloud Shell
  2. cd python-docs-samples/speech/cloud-client/
$ virtualenv env
$ source env/bin/activate
  1. pip install -r requirements.txt
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/py
thon3.5m -I/home/harin_sanghirun/python-docs-samples/speech/cloud-client/env/include/python3.5m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.5/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
     #include "portaudio.h"
                           ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
Command "/home/harin_sanghirun/python-docs-samples/speech/cloud-client/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rttf92f_/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-record-hj3mco5q/install-record.txt --single-version-externally-managed --compile --install-headers /home/harin_sanghirun/python-docs-samples/speech/cloud-cli
ent/env/include/site/python3.5/pyaudio" failed with error code 1 in /tmp/pip-install-rttf92f_/pyaudio/
@nnegrey
Copy link
Contributor

nnegrey commented Mar 20, 2019

Hey, thanks for the feedback. Hmmm yea it looks like the pyaudio dependency can't be installed on Cloud Shell.

As a quick fix to unblock you, feel free to remove that dependency as it is only used for the microphone samples (which I don't think cloud shell will support).

@nnegrey
Copy link
Contributor

nnegrey commented Mar 20, 2019

Another option: sudo apt-get install python-pyaudio python3-pyaudio, but this doesn't fix working inside a virtual env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants