Python 导入错误:没有名为app.management.commands的模块

Python 导入错误:没有名为app.management.commands的模块,python,django,python-import,add-custom-command,Python,Django,Python Import,Add Custom Command,当我运行命令导入我的python文件时,我得到一个导入错误,表示没有名为app.management.commands的modue >>> from app.management.commands import scripty Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named app.managemen

当我运行命令导入我的python文件时,我得到一个导入错误,表示没有名为app.management.commands的modue

>>> from app.management.commands import scripty
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named app.management.commands
有人能帮我吗。

系统路径中是否有app.management.commands


看起来您必须使用.app.management.commands导入它。

您希望如何加载此语句?从您现有的文件结构?背景是什么?请描述一下你的项目结构,你能简要介绍一下吗。我对django完全陌生
>>> from app.management.commands import scripty
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named app.management.commands