Python 3.6
我已经编写了一些组件,我正在尝试将其中一个导入另一个。
以下是我的项目结构:
.
âââ components
âââ __init__.py
  âââ extract
â  âââ python3
| âââ __init__.py
â  âââ extract.py
  âââ transform
  âââ python3
âââ __init__.py
  âââ preprocess.py
extract.py
from components.transform.python3.preprocess import my_function
if __name__ == '__main__':
my_function()
def my_function():
print("Found me")
当我跑的时候
python components/extract/python3/extract.py
我添加了一个空的
__init__.py