python package를 만들고 발생되는 에러를 확인해보자.
에러 로그
'Attempted relative import beyond top-level package'
python 공식 문서에서 확인한 import 방식
Note that relative imports are based on the name of the current module. Since the name of the main module is always "main", modules intended for use as the main module of a Python application must always use absolute imports.
해석
상대경로로 import 시 현재 module의 이름을 기반으로 한다다. main 모듈의 이름은 항상 "main"이기 때문에, 파이썬 어플리케이션은 항상 절대경로를 사용해야 한다.
절대경로로 설정 후 import 시 문제없이 작동.