简体   繁体   English

如何修复“ google.cloud.vision”在python3中没有属性“客户端”?

[英]How to fix 'google.cloud.vision' has no attribute 'Client' in python3?

I am running a simple code that utilizes google cloud vision api but it keeps on throwing this error. 我正在运行一个利用Google Cloud Vision API的简单代码,但会不断抛出此错误。 I have tries upgrading my packages shown here: How to fix AttributeError: 'module' object has no attribute 'Client' when running python in Google Cloud Interactive Shell but the error persists. 我尝试升级此处显示的软件包: 如何修复AttributeError:在Google Cloud Interactive Shell中运行python时,“模块”对象没有属性“客户端”,但错误仍然存​​在。

PS:am using a virtual environment(virtualenv) PS:am使用虚拟环境(virtualenv)

The Client() class was removed in the Client Library v0.25.1 and replaced with ImageAnnotatorClient() . Client()在Client Library v0.25.1中删除,并由ImageAnnotatorClient()取代

You can either replace Client with ImageAnnotatorClient , or use a version of the Client Library prior to v0.25.1 by specifying it in the requirements.txt 您可以使用ImageAnnotatorClient替换Client ,或者通过在requirements.txt中指定v0.25.1之前的版本使用Client Library的版本。

暂无
暂无

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

相关问题 AttributeError:模块“ google.cloud.vision”没有属性“ Client” - AttributeError: module 'google.cloud.vision' has no attribute 'Client' AttributeError:模块“google.cloud.vision”没有属性“类型” - AttributeError: module 'google.cloud.vision' has no attribute 'types' 无法导入 google.cloud.vision - Can't import google.cloud.vision 如何修复AttributeError:在Google Cloud Interactive Shell中运行python时,'module'对象没有属性'Client' - How to fix AttributeError: 'module' object has no attribute 'Client' when running python in Google Cloud Interactive Shell 如何修复错误“AttributeError:'module'对象在python3中没有属性'client'? - How to fix error "AttributeError: 'module' object has no attribute 'client' in python3? 导入错误:虽然我安装了谷歌云视觉,但无法从“google.cloud.vision”导入名称“types” - ImportError: cannot import name 'types' from 'google.cloud.vision' though I have google cloud vision installed 如何修复Google Cloud Vision的细分错误? - How to Fix Segmentation Fault for Google Cloud Vision? 如何修复 Google Cloud ssh“模块‘时间’没有属性‘时钟’”? - How to fix Google Cloud ssh "module 'time' has no attribute 'clock'"? Google Cloud Vision 搜索产品 Python 客户端 - 如何返回 10 个以上的结果? - Google Cloud Vision Search Product Python Client - How to return more than 10 results? 如何在python3中修复'NoneType'的属性错误? - How to fix a Attribute Error for a 'NoneType' in python3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM