Absolute imports in python not working, relative imports work
Since it’s not shown, I have to assume you’re running python a/foo.py, this puts the directory of the script (‘a’) on the beginning of sys.path when in reality you want the current directory on the beginning of sys.path. You should instead run python -m a.foo which will correctly initialize the sys.path roots for your project … Read more