Python: Not able to import module from sibling directory -
i using python 3.4
i have cloned git repo has structure this:
parent_dir/ . .#random things . sub_dir/ sub_dir1/ __init__.py file1.py sub_dir2 __init__.py file2.py sub_dir3 file3.py __init__.py
content of file2.py
from sub_dir.sub_dir1.file1 import attibute1 #ok sub_dir.sub_dir3.file3 import attribute1 #gives error there no module named sub_dir3
i tried add __init__.py
file sub_dir3 still gave same error. tried experiment created own project similar structure in case works fine.
is there obvious overlooking in original package working with?
my ide pycharm.
Comments
Post a Comment