I have a trouble with imports in my project.
My directories structure is the following:
base_directory
- examples
- src
- folder_1
- __init__.py
- file.py
- folder_2
- __init__.py
- class1.py
- class2.py
- class3.py
- class4.py
In file.py
I'm trying: from ..folder2.class1 import Class1
then, I get the error:
ImportError: attempted relative import with no known parent package
In folder2/__init__.py
I did what I saw on a tutorial for making packages in Python:
from class1 import Class1
my_class_1 = Class1()
So far, anything has worked. What should I do? I use Python 3.7.5
Thanks.