ImportError: cannot import name pubsub_v1

这一生的挚爱 提交于 2019-12-01 04:43:45

I had the same problem, it happened to me because I installed google-cloud-pubsub before google-cloud so here is my advise :

sudo pip uninstall google-cloud-pubsub
sudo pip uninstall google-cloud
sudo pip install google-cloud
sudo pip install google-cloud-pubsub

Upgraded the other google.cloud modules using

$sudo pip install --upgrade google-cloud-bigquery
$sudo pip install --upgrade google-cloud-storage
$sudo pip install --upgrade google-cloud-logging

It resolves the issue.

$sudo pip install googleapis-common-protos

It resolves the issue for me!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!