I have a python file named x.py which imports another file named y.py. y.py itself imports z.py, y.py and z.py are in the same directory but x.py is in the parent directory.
When I use relative import in y.py e.g. import .z y does not work and x works. When I change import to import z y.py works but x.py does not work
dic1
|__x.py
|__dic2
|__y.py
|__z.py
x imports y
y imports z
is there any solution to import a python file that imports another file in different directories.
__init__.pyin every folder and then try again - singrium