简体   繁体   English

ModuleNotFoundError:没有名为“google.cloud”的模块,即使我安装了它

[英]ModuleNotFoundError: No module named 'google.cloud' even though I installed it

I want to use the vision api and I just started with the imports.我想使用视觉 api 而我刚开始导入。 I am getting the message I pasted in the title when I run the code, so far I tried to pip install google-cloud which should I believe be all I need to do.当我运行代码时,我收到了粘贴在标题中的消息,到目前为止,我尝试pip install google-cloud ,我相信这应该是我需要做的。 I am using python 3.6.2, pip 20.3.3 and windows 10 64bit.我正在使用 python 3.6.2、pip 20.3.3 和 windows 10 64 位。 I am using a virtual environment.我正在使用虚拟环境。 This is my code so far, as I mentioned these are just imports:到目前为止,这是我的代码,正如我所提到的,这些只是导入:

import os, io
from google.cloud import vision
from google.cloud.vision import types

and I am failing at line 2.我在第 2 行失败了。

edit: my bad, fixed by creating and downloading a key on the google website, you better read the installation constructions completely if you had the same problem!编辑:我的错,通过在谷歌网站上创建和下载密钥来解决,如果你有同样的问题,你最好完全阅读安装结构! set GOOGLE_APPLICATION_CREDENTIALS=apikey.json oh yeah you should cd into the directory of the key file, or include the path of the file. set GOOGLE_APPLICATION_CREDENTIALS=apikey.json哦,是的,你应该 cd 进入密钥文件的目录,或者包含文件的路径。

my bad, fixed by creating and downloading a key on the google website, you better read the installation constructions completely if you had the same problem.我的不好,通过在谷歌网站上创建和下载密钥来解决,如果你有同样的问题,你最好完全阅读安装结构。 set GOOGLE_APPLICATION_CREDENTIALS=apikey,json oh yeah you should cd into the directory of the key file.设置 GOOGLE_APPLICATION_CREDENTIALS=apikey,json 哦,是的,你应该 cd 进入密钥文件的目录。 or include the path of the file.或包含文件的路径。

暂无
暂无

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

相关问题 ModuleNotFoundError:没有名为“google.cloud”的模块 - ModuleNotFoundError: No module named 'google.cloud' 从google.cloud导入bigquery ModuleNotFoundError:没有名为“ google”的模块 - from google.cloud import bigquery ModuleNotFoundError: No module named 'google' 来自google.cloud导入firestore ModuleNotFoundError:没有名为'google'的模块 - from google.cloud import firestore ModuleNotFoundError: No module named 'google' “ModuleNotFoundError:即使安装了模块,也没有名为‘...’的模块 - "ModuleNotFoundError: No module named '…' even though module is installed 来自google.cloud导入语言ModuleNotFoundError:没有名为“ google.cloud”的模块 - from google.cloud import language ModuleNotFoundError: No module named 'google.cloud' ModuleNotFoundError:即使我安装了功能工具,也没有名为“功能工具”的模块 - ModuleNotFoundError: No module named 'featuretools' even though I have installed featuretools ModuleNotFoundError:即使已安装,也没有名为“pycountry”的模块 - ModuleNotFoundError: No module named 'pycountry' even though it is installed 没有名为 google.cloud 的模块 - No module named google.cloud from google.cloud import Speech_v1 ---- ModuleNotFoundError: No module named 'google' - from google.cloud import speech_v1 ---- ModuleNotFoundError: No module named 'google' 没有名为“google.cloud”的模块 Dockerfile python - No module named 'google.cloud' Dockerfile python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM