首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“google.cloud.storage”的问题。模块没有属性'Client‘

“google.cloud.storage”的问题。模块没有属性'Client‘
EN

Stack Overflow用户
提问于 2019-03-18 06:22:01
回答 1查看 3K关注 0票数 2

尝试使用这些指令简单地连接到google-cloud-storage;

https://googleapis.github.io/google-cloud-python/latest/storage/index.html

然而,我总是遇到存储模块的问题,没有客户端属性。

代码语言:javascript
复制
from google.cloud import storage
# Instantiates a client
storage_client = storage.Client(credentials=creds, project='name')
# The name for the new bucket
bucket_name = 'my-new-bucket'
# Creates the new bucket
bucket = storage_client.create_bucket(bucket_name)
print('Bucket {} created.'.format(bucket.name))
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-18 06:36:57

这是我见过几次的问题,在其他google.cloud模块中也会发生。大多数情况下,它与损坏的安装有关

尝试卸载,然后卸载installgoogle.cloud包。如果不走运,试着在新创建的虚拟环境中使用它(这肯定会有效)

Related git issue with same solution

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

https://stackoverflow.com/questions/55212535

复制
相关文章

相似问题

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