본문 바로가기
코딩공부/Django

Python 라이브러리 의존성 확인하는 방법(pipdeptree)

by Dong_Devlog 2022. 12. 13.

파이썬으로 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

댓글