파이썬으로 pip를 통해 패키지를 설치하고 서버에 배포하려고 하다보니 도커 이미지 생성 중에 임포트 에러가 발생하였다.
이것 저것 찾다보니 원인은 requirements.txt의 설치할 패키지 항목 중에 의존성 패키지가 껴있다보니 의존성 패키지를 설치하면서 에러가 발생한 듯 하다. 의존성 패키지를 빼준 후에 설치하니 문제 없이 설치 완료 !
후에 좀 알아보니 pipdeptree로 의존성 패키지를 간편하게 확인할 수 있다고 한다.
📌 pipdeptree 설치 방법
pip로 간단하게 설치할 수 있다.
pip install pipdeptree
GitHub - tox-dev/pipdeptree: A command line utility to display dependency tree of the installed Python packages
A command line utility to display dependency tree of the installed Python packages - GitHub - tox-dev/pipdeptree: A command line utility to display dependency tree of the installed Python packages
github.com
📌 의존성 체크
터미널 창에 pipdeptree를 입력하면 의존성에 대한 정보가 출력 된다.
pipdeptree
'코딩공부 > Django' 카테고리의 다른 글
Django Q() (1) | 2022.12.27 |
---|---|
DRF Serializer를 통한 유효성 검사 (0) | 2022.12.21 |
DRF SerializerMethodField()로 모델 필드 변형하여 활용하기 (0) | 2022.12.08 |
Django 각종 API Key, Token 관리하는 방법 (0) | 2022.12.07 |
DRF APIView로 좋아요 기능 구현_백엔드 (0) | 2022.12.02 |
댓글