Closed scastria closed 5 months ago
Sorry I missed this question.
I am more comfortable with absolute imports, to be honest. If foo.baz
module imports
.bar
, I tend to rather do import foo.bar
. PYTHON path needs to point to the directory
containing foo
.
Otherwise, it should work with relative imports. There's no more info to provide better help.
My python file that contains the ArgumentParser config has imports at the top that will not work unless the PYTHONPATH is configured correctly. It may reference other modules are reference:
from . import XXX
which fails with:
ImportError: attempted relative import with no known parent package
Any suggestions?