首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:google 1.0.0有要求google-auth~=1.17.2,但是google 1.22.0不兼容

错误:google 1.0.0有要求google-auth~=1.17.2,但是google 1.22.0不兼容
EN

Stack Overflow用户
提问于 2020-10-03 16:42:17
回答 1查看 1.3K关注 0票数 0

突然,colab在安装云视觉和使用api.How解决这个问题时出现了这个错误?如何在colab中更新google?

代码语言:javascript
复制
!pip install google-cloud-vision
from google.cloud import vision
from google.cloud.vision import types

client = vision.ImageAnnotatorClient.from_service_account_file(
"/content/gdrive/My Drive/dataset/test3-4a6f8fdcb08c.json"
)

ERROR: google-colab 1.0.0 has requirement google-auth~=1.17.2, but you'll have google-auth 1.22.0 which is incompatible

代码语言:javascript
复制
ContextualVersionConflict                 Traceback (most recent call last)
<ipython-input-2-d300b7f6306a> in <module>()
      1 get_ipython().system('pip install google-cloud-vision')
----> 2 from google.cloud import vision
      3 from google.cloud.vision import types
      4 
      5 client = vision.ImageAnnotatorClient.from_service_account_file(

9 frames
/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)
    773                 # Oops, the "best" so far conflicts with a dependency
    774                 dependent_req = required_by[req]
--> 775                 raise VersionConflict(dist, req).with_context(dependent_req)
    776 
    777             # push the new requirements onto the stack

ContextualVersionConflict: (google-api-core 1.16.0 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('google-api-core[grpc]<2.0.0dev,>=1.22.2'), {'google-cloud-vision'})
EN

回答 1

Stack Overflow用户

发布于 2021-02-21 04:25:25

我在Colabs上从google.cloud库导入pubsub也遇到了同样的问题。我只是重新启动运行时,相同的代码运行时没有问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64186627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档