I have the following structure
folder/
├─ subfolder/
│ ├─ __init__.py
│ ├─ script.py
├─ __init__.py
├─ module.py
Inside script.py
I want to import the function my_function
from module.py
. I have tried various variants
from ..module import my_function
from ...folder.module import my_function
from .. import module # and then use module.my_function
from ... import folder.module # and then use folder.module.my_function
However, whenever I am in the terminal inside folder
and run python3 subfolder/script.py
I get the error
ImportError: attempted relative import with no known parent package