I am trying to access a function in package1 from inside package 2
project
|- __init__.py
|- package1
|-__init__.py
|-module1.py
|- package2
|-__init__.py
|-module2.py
package1/__init __.py
from .module1 import my_function
# I have also tried the following:
# from module1 import my_function
# from module1 import *
# import module1
# and also leaving this file empty
package2/module2.py
from ..package1 import my_function
# I have also already tried the following:
# from ..package1 import module1
# from .. package1 import module1
# from ..package1 import my_function
# from .. package1 import my_function
# import sys
# sys.path.append('.')
# import package1