0

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.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
user148728
  • 39
  • 1

0 Answers0