pip package manager

찌니·2021년 3월 9일
0

1. pip란?

2. pip 사용

  • pip는 자주 업데이트 되므로 가상환경에서 업데이트해주는 것이 좋다.
    pip install -upgrade pip

  • pip 패키지 검색
    pip search

  • pip 설치 리스트 확인
    pip list
    pip freeze : pip install에 맞는 포맷으로 리스트를 뿌려줌

3. pip 패키지 설치 및 업그레이드

  • 일반적인 외부 라이브러리 설치
    pip install 패키지명

  • 로컬 외부 라이브러리 설치 (일반적으로 압축파일로 특정 사이트에서 제공해줄 경우)
    pip install 파일명

  • 파일에 기록된 패키지 리스트 모두 설치하는 법
    : 파이썬 프로젝트에서는 일반적으로 프로젝트에 필요한 라이브러리 리스트를 requirements.txt 파일에 입력해 둔다.
    pip install -r requirements.txt

  • 특정 버전 설치 (defalt=최신버전)
    pip install 패키지명==버전넘버

  • 특정 버전 이상을 설치
    pip install 패키지명>=버전넘버

  • 특정 라이브러리 업그레이드
    pip install --upgrade 패키지명

  • 특정 라이브러리 삭제
    pip uninstall 패키지명

  • 라이브러리 정보 확인
    pip show 패키지명

profile
https://gggggeun.tistory.com/

0개의 댓글