1
我有这样的结构,我的包:无模块名为/父模块3.5.0
/code_trou
__init__.py
Main.py
Menu.py
/postprocessing
/preprocessing
Mesh.py
Point.py
/processing
FDM.py
/tools
dllmrg.py
errormrg.py
/__pycache_
errormrg.cpython-35.pyc
当我执行我的Main.py
有:
from tools.errormrg import *
我有这样的错误: "No module named 'tools'"
这是同样的当我执行Point.py
有:
from tools.dllmrg import *
对于Point.py
我试图the Intra-package References described in the doc,它似乎并没有工作:
from ..tools.dllmrg import *
你需要在'/ tools'一个'__init __。py',使一个模块太(同为其他子模块)。 – jonrsharpe