1

I use Cloud Shell Console to write python code that uses Google Speech to Text

Steps taken:

  1. Google cloud shell console to write the code

  2. gcloud app deploy

  3. Error message: File "/home/vmagent/app/main.py", line 3, in <module> from google.cloud import speech_v1 ModuleNotFoundError: No module named 'google'

  4. pip list run on the console shows that 'google' is included

Kevin Lemaire
  • 949
  • 2
  • 12
  • 36
Julia K
  • 11
  • 2
  • Do the answers here help you?: https://stackoverflow.com/questions/48459712/how-to-import-google-cloud-speech-recognition-in-google-app-engine-python – mechanical_meat Dec 27 '19 at 00:49
  • Did you try to reinstall the client library? Are you trying to deploy it in App Engine Standard or Flexible? Also could you provide your configuration files and a code snippet to check on it? – tzovourn Dec 27 '19 at 08:16
  • I am using standard flex on gcloud. And I deploying using browser base console interface. Thanks – Julia K Dec 28 '19 at 03:22
  • Could you please provide the requirements.txt , app.yaml and a sample of the code ? – Andrei Tigau Dec 30 '19 at 08:50
  • What is in your `requirements.txt` file? It should contain the [`google-cloud-speach`](https://pypi.org/project/google-cloud-speech/) package. – Dustin Ingram Jan 03 '20 at 22:33

1 Answers1

1

Try using pip3 instead of pip.

It took me hours to find out the files had been in another directory all along.

cadavid
  • 11
  • 1