My project has this kind of structure:
mypackage
|
|-- __init__.py
|
|-- file.py
|
|-- subpackage
|
|-- __init__.py
|
|-- function.py
How do I import the modules in the subpackage from file.py?
I tried a couple of things like simply import subpackage or from subpackage import function but all of them lead to ModuleNotFoundError: No module named 'subpackage'.
from . import subpackage has no error message but I don't know how to access the module with that.