The below code in mod_b.py
from a.sub_a import mod_a
mod_a.sample()
Trying to Run Python file in the Terminal from mod_b, Getting the below error:
(base) C:\Users\%%\Desktop\python-test>C:/Users/%%/AppData/Local/Continuum/anaconda3/python.exe c:/Users/%%/Desktop/python-test/a/sub_b/mod_b.py
Traceback (most recent call last):
File "c:/Users/%%/Desktop/python-test/a/sub_b/mod_b.py", line 1, in <module>
from a.sub_a import mod_a
ModuleNotFoundError: No module named 'a'