简体   繁体   English

from google.cloud import Speech_v1 ---- ModuleNotFoundError: No module named 'google'

[英]from google.cloud import speech_v1 ---- ModuleNotFoundError: No module named 'google'

I use Cloud Shell Console to write python code that uses Google Speech to Text我使用 Cloud Shell Console 编写使用 Google Speech to Text 的 python 代码

Steps taken:采取的步骤:

  1. Google cloud shell console to write the code谷歌云shell控制台编写代码

  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'错误消息: 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在控制台上运行的pip list显示包含“google”

Try using pip3 instead of pip .尝试使用pip3而不是pip

It took me hours to find out the files had been in another directory all along.我花了几个小时才发现这些文件一直在另一个目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从google.cloud导入bigquery ModuleNotFoundError:没有名为“ google”的模块 - from google.cloud import bigquery ModuleNotFoundError: No module named 'google' 来自google.cloud导入firestore ModuleNotFoundError:没有名为&#39;google&#39;的模块 - from google.cloud import firestore ModuleNotFoundError: No module named 'google' 来自google.cloud导入语言ModuleNotFoundError:没有名为“ google.cloud”的模块 - from google.cloud import language ModuleNotFoundError: No module named 'google.cloud' ModuleNotFoundError:没有名为“google.cloud”的模块 - ModuleNotFoundError: No module named 'google.cloud' ModuleNotFoundError:没有名为“google.cloud”的模块,即使我安装了它 - ModuleNotFoundError: No module named 'google.cloud' even though I installed it 没有名为 google.cloud 的模块 - No module named google.cloud 如何在 requirements.txt 中为 Google Cloud Function 导入 Speech_v1 - How to import speech_v1 in requirements.txt for a Google Cloud Function 导入错误:ApacheBeam 上没有名为“google.cloud”的模块 - Import Error: No module named 'google.cloud' on ApacheBeam 尝试从google.cloud导入pubsub时,没有名为service_account的模块 - No module named service_account when trying to import pubsub from google.cloud 没有名为“google.cloud”的模块 Dockerfile python - No module named 'google.cloud' Dockerfile python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM