I'm trying to import a file from another directory but it's not working.
App
|___init__.py
|_notebooks
| |__init__.py
| |_test.py
|_src
| |___init__.py
| |_loss.py
I want to import loss in test.py. I have tried
from src import loss
--> which is giving me no module named src error
from .src import loss
and from ..src import loss
--> gives attempted relative import with no known parent package
sys.path.insert(0, '../src/')
import loss
is working but I want to do it without using sys. so that there won't be any headache in the production and I believe its possible. i have gone through this thread but none of the solutions seems to be working.