Error message
ImportError: cannot import name 'NDArray' from 'numpy.typing' (/opt/conda/lib/python3.7/site-packages/numpy/typing/init.py)
환경: Ubuntu 20.04, python 3.7, numpy 1.20.2
사용 목적: mmdetection 프레임워크에서 모델 추론
전달 받은 모델을 추론만 돌려보려고 해서 mmdetection 내 환경 설정을 하고 모델을 돌리려니 이런 에러가 뜹니다.
ImportError: cannot import name 'NDArray' from 'numpy.typing' (/opt/conda/lib/python3.7/site-packages/numpy/typing/init.py)
Solve
numpy 패키지의 버전 문제라고 해서 현재 numpy 버전 확인 후 1.21.0 으로 업데이트 한 뒤 잘 동작하는 것을 확인했습니다.