My current working files are in the following file structure:
--Trick_Folder (root folder)
--try.py
--LTransform (sub-folder)
--encoder.py
--decoder.py
--sampler.py
--__init__.py
in my try.py I try to write import one of the module from the sub-folder LTransform as follows:
**Python-3.4.3
from LTransform import encoder
(Note: In the encoder.py there is an import sampler line in it)
this is the error I am getting:
import sampler
ImportError: No module named 'sampler'
I tried understanding it but I can't wrap my head around it. The__init__.py is already in the sub-folder and my PYTHONPATH is set on the root-folder Trick_Folder as /home/user/Trick_Folder
Why can Python3 interpreter call the sampler.py when importing the encoder.py from the root folder(Trick_Folder)?