How can I do relative imports in Python?
Everyone seems to want to tell you what you should be doing rather than just answering the question. The problem is that you’re running the module as ‘__main__’ by passing the mod1.py as an argument to the interpreter. From PEP 328: Relative imports use a module’s __name__ attribute to determine that module’s position in the …