Working directory is shaped like:
* main_script.py / module_to_import * __init__.py * script_1.py * script_2.py In main_script.py we have
from module_to_import import script_1 script_1.call_something() In script_1.py we have
import script_2 def call_something(): something = script_2.get_something() something = something + 1 return something When main_script.py is run This returns a
ModuleNotFoundError: No Module named 'script_2'
I understand this could be provisionally resolved by directly importing script_2 into main_script.
Is there a way to resolve this so that script_1 can reliably import script_2 even when main_script has not imported script_2 itself?