Python - Module Not Found Error when running main function in secondary folder
Solution 1:
If you try to import something the code is seeking from the folder you have run the file in.
So in folder secondary-folder
you have no module (folder) named model
. You have to leave that folder with calling parent folder, project
in this case.
Try this in new_main.py
:
from project.model.abc import ABC
if __name__ == "__main__":
ABC().print_abc()