我正在尝试运行我的脚本,以将文件从Google云存储桶下载到本地目录,并且得到:
Traceback (most recent call last):
File "ingest/tasks/download_feeds.py", line 5, in <module>
from google.cloud import datastore, storage
File "/Users/manelrhaiem/liqid-marketing-pipeline/yoda/lib/python3.6/site-packages/google/cloud/storage/__init__.py", line 40, in <module>
from google.cloud.storage.client import Client
File "/Users/manelrhaiem/liqid-marketing-pipeline/yoda/lib/python3.6/site-packages/google/cloud/storage/client.py", line 20, in <module>
from google.cloud.client import ClientWithProject
ImportError: cannot import name 'ClientWithProject'
看起来该错误与库本身更相关,这是我的pip freeze | grep google
结果:
gapic-google-logging-v2==0.9.3
gapic-google-pubsub-v1==0.9.3
google-api-core==1.3.0
google-auth==1.5.1
google-cloud==0.19.0
google-cloud-core==0.28.1
google-cloud-logging==1.6.0
google-cloud-storage==1.6.0
google-gax==0.13.0
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3
grpc-google-logging-v2==0.9.3
grpc-google-pubsub-v1==0.9.3
我认为它可能与某些兼容版本有关,但我不确定。
期待您的帮助