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

希勒克斯

我正在运行一个使用谷歌云视觉 API 的简单代码,但它一直在抛出这个错误。我已尝试升级此处显示的软件包:How to fix AttributeError: 'module' object has no attribute 'Client' when running python in Google Cloud Interactive Shell但错误仍然存​​在。

PS:我正在使用虚拟环境(virtualenv)

斯图

Client()被类客户端库v0.25.1取出,并用ImageAnnotatorClient()取代

您可以替换ClientImageAnnotatorClient,或者通过在 requirements.txt 中指定来使用 v0.25.1 之前的客户端库版本

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何修复AttributeError:在Google Cloud Interactive Shell中运行python时,“模块”对象没有属性“客户端”

如何修复Google Cloud Big Table中丢失的实例

如何使用Bluebird Promise(@ google-cloud)修复“分页中未定义的响应”

如何修复'str'对象在我的python3脚本中没有属性'read'

如何修复错误“ AttributeError:'模块'对象在python3中没有属性'客户端'?

如何修复“'pandas.compat'没有属性'string_types'”在python3中的错误

如何修复Google-cloud-sdk 156.0.0“应用程序中文件太多,无法监视所有文件中的更改。”?

如何修复:Google Cloud SQL导出403错误

Google Cloud Platform修复SSH

如何授权google cloud vision API android

如何在Google Cloud Platform中为Node应用安装Python3

如何查看Google Cloud Vision API中的配额限制?

Google Cloud SDK与Google Cloud Client库

如何使用带有 Python 的 Google Cloud Functions 将列表写入 Google Cloud Storage 中的文件

如何从python函数登录Google Cloud Storage?

如何从 Google Cloud Functions 中删除文件

如何在Google Cloud中存储图像?

如何修复Python 3.x中的``Alpr''对象没有属性``已加载''错误

Google Cloud Vision Block Index

Google Cloud Function + Python

Google Cloud Datastore“ NoneType”对象没有属性“ email”

google.cloud模块没有属性存储

AttributeError:模块“ google.cloud”没有属性“ storage”

从Cloud Function(Python)写入Google Cloud Storage

如何在Google Cloud Scheduler(Python)中定义的Google Cloud函数中使用主体参数?

没有Google帐户的Google Cloud Endpoints

Google Cloud Datastore中的多属性投影查询没有结果

Google Cloud Python函数如何访问私有Python包

如何使用存储在Google Cloud Storage中的图像调用Google Vision API?