ImportError: cannot import name pubsub_v1

后端 未结 4 1787
被撕碎了的回忆
被撕碎了的回忆 2020-12-19 02:36

I need to import Pubsub_v1 and bigquery from google.cloud module. I have installed it and pip freeze shows below :

gapic-google-cloud-pubsub-v1==0.15.4
googl         


        
相关标签:
4条回答
  • 2020-12-19 02:52

    $sudo pip install googleapis-common-protos

    It resolves the issue for me!

    0 讨论(0)
  • 2020-12-19 02:53

    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
    
    0 讨论(0)
  • 2020-12-19 03:04

    These were helpful to resolve the issue for python 3.x version: (I assumed the pip3 has been installed) sudo pip3 install google-cloud-bigquery sudo pip3 install google-cloud-pubsub sudo apt-get upgrade

    0 讨论(0)
  • 2020-12-19 03:11

    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.

    0 讨论(0)
提交回复
热议问题