I know that maybe you have faced this question many times. But since I couldn't find a solution to answer this question, I wanted to write it here again. For example:
main/
model/
mod1.py
lib/
mod2.py
I have a folder structure as above. I want to import the mod2.py file in the lib folder to the mod1.py file in the model folder. For this, I add the following line to the mod1 file.
lib.mod2 as mod2
But when I do this I get the following error.
No module named 'lib.mod2'
Can you help me?
Python version : 3.10.4