[英]AttributeError: module 'google.cloud.vision' has no attribute 'Client'
[英]How to fix 'google.cloud.vision' has no attribute 'Client' in python3?
我正在运行一个利用Google Cloud Vision API的简单代码,但会不断抛出此错误。 我尝试升级此处显示的软件包: 如何修复AttributeError:在Google Cloud Interactive Shell中运行python时,“模块”对象没有属性“客户端”,但错误仍然存在。
PS:am使用虚拟环境(virtualenv)
Client()
类在Client Library v0.25.1中已删除,并由ImageAnnotatorClient()取代 。
您可以使用ImageAnnotatorClient
替换Client
,或者通过在requirements.txt中指定v0.25.1之前的版本使用Client Library的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.