I don't find the mistake in the code nor in the call when trying an import test.
My directory structure is the following: (from /home/user1/python_test/)
main.pyAux/lib1.pyAux/__init__.pymain.py:
from Aux.lib1 import fun_Aif __name__ == "__main__": fun_A() print("all done")Aux/lib1.py:
def fun_A(): print("A function called")I'm executing from terminal (python main.py from directory where main.py is), maybe is there a need to set pythonpath? I don't recall the need before, I've made some python programs like these some time ago (2/3 years)
I have also tried from .Aux.lib1 import fun_A instead of from Aux.lib1 import fun_A but nothing works. The error is:
File "main.py", line 1, in <module> from Aux.lib1 import fun_AImportError: No module named Aux.lib1