I have project structure like this:
package1/__init__.py
package1/file1.py
package1/file2.py
package2/__init__.py
package2/file1.py
package2/file2.py
__init__.py
script1.py
script2.py
Unfortunately, I found that I can run code only from root directory, for example, from script1.py. If I run say from pakage2/file2.py, all links between files are lost, i.e. all imports of package1 from package2 becomes not found.
What is the correct directory structure in Python, which constraints package structure over all directories?