简体   繁体   English

安装了google-cloud-storage模块0.22.0,可以自行导入,但不能作为导入导入

[英]Installed the google-cloud-storage module 0.22.0, Imports fine by itself but not as an import of an import

I install the google cloud storage module via pip. 我通过pip安装了Google云存储模块。 It imports fine as a standalone. 它可以独立进口。

>>> import google.cloud.storage

It imports fine if the import is in the file I'm running on. 如果导入位于我正在运行的文件中,则导入效果很好。 It doesn't import if I import a file from another module that's import it. 如果我从导入文件的另一个模块中导入文件,则不会导入。

python dag.py list_tasks
File "/home/test/hecks/airflow-dags/dags/extract/api_extract.py", line 3, in <module>
    from google.cloud.storage import Client
ImportError: No module named cloud.storage

Duplicate module names. 重复的模块名称。 Conflicted with the installed package. 与已安装的软件包冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM