I know there are a lot of readings for this topic available, but I can't figure out how to get it work for my specific case.
I have a project structure like this
root
folder1
__init__.py
file1.py
file2.py
folder2
__init__.py
file3.py
file4.py
folder3
__init__.py
file5.py
In file3.py
I have a function getNumbers()
which i want to import in file2.py
like this:
from folder2.file3 import getNumbers()
The __init__.py
files are all empty.
I do get Error if I run file2.py
from folder1
-directory
No module named 'folder2'
How can i get the import from different subdirectories work?