My package is far more complex, but here's everything stripped out and made easier to read as an example:
sound/
__init__.py
formats/
__init__.py
wavread.py
wavwrite.py
effects/
__init__.py
echo.py
(Note: I borrowed this structure from the official tutorial)
I want to be able to reference echo.py from wavwrite.py.
In wavwrite.py, I made my reference this way:
from ..effects import echo
And I get this error:
File "C:\sound\formats\wavwrite.py", line 1, in <module>
from ..effects import echo
SystemError: Parent module '' not loaded, cannot perform relative import
I had a friend comment that I should try an absolute import, and in that case, I get a different issue.
In wavwrite.py, I made my reference this way:
from effects import echo
Or
import effects.echo as echo
And I get this error:
ImportError: No module named 'effects'
This all looks correct to me based upon how I understand this should work, and it's driving me nuts. It has to be something simple that I'm missing.