Google Cloud - Resource_manager Python 模块问题

问题描述 投票:0回答:2

我正在为 Google Cloud 准备自动化。我正在使用本机 Python 模块。我所有的代码都存储在 GIT 存储库中。我正在使用 PyCharm,并且在 PyCharm 中添加了文件源以便使用 GIT 存储的文件(设置/项目/项目结构)。我将 GIT 文件添加为

sources root
。运行代码后,我仍然收到如下错误消息:
ImportError: cannot import name 'resource_manager' from 'google.cloud' (unknown location)
。在我的笔记本电脑上,我安装了 Google 自动化所需的模块:google-api-python-client、oauth2client、google-cloud-resource-manager。其余模块工作正常,我可以导入自定义模块。我已经安装了Python 3.9,pip v.21.2.2,google-cloud-resource-manager 1.0.2

python google-cloud-platform google-api-python-client
2个回答
2
投票

尝试使用以下版本 google-cloud-resource-manager==0.30.0


0
投票

看来现在需要这样了:

from google.cloud import resourcemanager_v3
© www.soinside.com 2019 - 2024. All rights reserved.