ModuleNotFoundError:没有名为“我的项目名称”的模块

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

enter image description here我尝试创建自己的项目,但我很难从我的项目中导入其他包和文件。

这是我的代码结构:

CodeOne  
    venv  
    src  
        codeone  
            audio  
                __init__.py  
                blabla.py  
            apis  
                __init__.py  
                blabla.py  
            functions 
                __init__.py  
                blabla.py  
            __init__.py  
            main.py  
            settings.py  

当我在 main.py 中运行以下代码时:

from codeone import settings  `

我得到以下错误:

回溯(最后一次通话): 文件“c:...\CodeOne\sr

python directory-structure
© www.soinside.com 2019 - 2024. All rights reserved.