Suppose my code tree look like this:
├── pipeline.py
└── preprocessing
├── preprocess.py
└── utils.py
The preprocess.py
uses utils.py
, and pipeline.py
uses preprocess.py
.
How the imports from each file should look like while using relative path?
I tried to add sys.append in many versions I also tried to play with the PYTHONPATH. Finally what worked to me is to write the global path to each script, but I'm looking for elegant way.