I have the following structure of folders
project\
main.py
datasets\
__init__.py
custom_data.py
models\
__init___.py
model1.py
model2.py
func.py
I would like to import func.py inside custom_data. (without using auxiliary libraries)
the main function imports custom_data.py with:
from datasets.custom_dataset import build as build_dataset
And when the code is running custom_dataset it fails to find the module func
ModuleNotFoundError: No module named 'func'
I have already tried anything I saw here in stackoverflow:
from ..models import func from project.models import func
I even tried to copy func.py as a duplicate inside datasets, but it doenst work at all (it does work when I use the func functions inside the custom_data.py, but does not when I call it from the main.py file).
Can anyone help me? Is it because I'm using windows maybe? I know I can find a lot of other questions related to this but none have helped me at all.