I have truly tried my best to understand python imports, but it makes no sense to me. I know there's a million SO threads on this but none of them have helped me understand what's going on.
I have this simple structure:
project/
    run.py
    datasets/
        __init__.py
        config.py
        datasetA.py
datasetA.py:
from config import classes
dosomething()
run.py:
from datasets import datasetA
And when I execute run.py, I get ModuleNotFoundError: No module named 'config'. Why? I have tried to include
import datasetA
import config 
as well as
import .datasetA
import .config 
in __init__.py but it makes no difference. datasetA sees __package__ = datasets, so it I think it should see config. run.py sees __package__ = None. What am I missing?
 
    