I have the following directory:

```
mydirectory
├── __init__.py
├── file1.py 
└── file2.py

```

I have a function f defined in file1.py.

If, in file2.py, I do

```
from .file1 import f

```

I get the following error:

> 
> SystemError: Parent module '' not loaded, cannot perform relative
>  import
> 
> 
> 

Why? And how to make it work?