I am running code from main.py. Following is my directory structure:
I'm using Python 3.6 and Linux.
PackA
PackB
PackC
_main.py
PackD
cython_file.pyx
def func() # function defined here.
cython_file.pxd
__init__.py
func() # function call.
The Package pyximport is installed used by Cython.
I'm importing the cython file in __init__.py
using:
from cython_file import func
Error: ImportError: cannot import name 'func'
Where am I doing wrong?