../root/
     bin/relative_path.py
     lib/my_module.py
examples/sys/lib/my_module.py
print("Importing my_module")
examples/sys/bin/relative_path.py
from __future__ import print_function
import os, sys

# import my_module   # ImportError: No module named my_module

print(__file__)   # examples/sys/bin/relative_path.py


root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
mypath = os.path.join(root, 'lib')

print(mypath)

sys.path.insert(0, mypath)

import my_module   # Importing my_module

# /Users/gabor/work/training/python/examples/sys/../lib