ModuleNotFoundError: No module named ‘__main__.xxxx’; ‘__main__’ is not a package
.moduleB is a relative import. Relative only works when the parent module is imported or loaded first. That means you need to have proj imported somewhere in your current runtime environment. When you are are using command python3 moduleA.py3, it is getting no chance to import parent module. You can: from proj.moduleB import moduleB OR … Read more