python - Receiving Import Error: No Module named ***, but has __init__.py -
i understand question has been asked several times after reading them, , making suggested fixes, i'm still stumped.
my project structure follows:
project | src | root - has __init__.py | nested - has __init__.py | tests - has __init__.py | utilities - has __init__.py | services - has __init__.py i've run unittest regression class eclipse without issues.
as attempted run same class command-line (as other users running suite not have access eclipse) receive error:
importerror: no module named 'root' as can see above, module root has __init__.py __init__.py modules empty.
and assistance gratefully received.
try adding sys.path.append list of imports.
import sys sys.path.append("/project/src/") import root import root.nested.tests
Comments
Post a Comment