I have a very simple test Python 3 project with the following file structure:
test/a.py
test/b.py
test/__init__.py
Everywhere I read, people say that in a.py
I should import b.py
using an absolute path:
from test.b import *
However, when I try I get the following error:
Traceback (most recent call last):
File "a.py", line 1, in <module>
from test.b import *
ModuleNotFoundError: No module named 'test.b'
I understand that I can import b.py
using from b import *
, however this is not what people recommend. They all recommend from test.b import *
. But I can't get even this simple example to work.