|Project
|--m1Folder
|--|--__init__.py
|--|--m1.py
|--m2Folder
|--|--__init__.py
|--|--m3Folder
|--|--|--__init__.py
|--|--|--m3.py
m1Folder
and m2Folder
are inside of Project
. m3Folder
is inside of m2Folder
. All m*Folder
contains empty __init__.py
.
How to import m1.py, from m3.py file?
I tried from m1Folder import m1 as mo
inside m3.py
file and gave ModuleNotFoundError: No module named 'm1Folder'
. However, pylint
in vscode
did not show any error.
from ...m1Folder import m1 as mo
gives ValueError: attempted relative import beyond top-level package