[英]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.