Note that I was looking for SO for this error, and when there were a lot of similar questions, I did not find the one that addressed this specific problem.
I am working on a Python module that looks like this:
/com /company /foo /bar
I am editing the source file in the bar directory and trying to import classes that live in the foo directory. I tried to import files in the following ways:
from com.company.foo import * from company.foo import * from foo import * import com.company.foo import company.foo import foo
Each of them causes a similar error:
ImportError: no module named com.company.foo
I have __init__.py files in each of the directories, including the directory containing com .
Not sure what I'm doing wrong here - in advance for help!
inkedmn
source share