1. 패키지 확인
- 설치된 패키지를 확인하기 위해서 둘 중 하나 입력
## 설치된 패키지를 출력
pip list
## 설치된 패키지를 requirements 포맷으로 출력
pip freeze
2. pip upgrade
- 아래와 같이 pip upgrade 안내가 나왔다면 pip 버전을 업데이트 하기 위하여 아래 명령 수행
pip install –upgrade pip
- PIP 버전이 업데이트 되면서 목록을 확인하는 방법이 변경되었다는 메시지가 출력
- 기존형식은 –format=legacy,변경된 형식은 –format=columns을 인자로 전달
3. pip install
- 새로운 패키지를 설치하기 위해서는 ‘pip install [pakage]’을 이용
pip install requests
pip install pandas==0.19.1
4. whl 파일로 설치
- 설치하여야 할 패키지가 pip install을 이용하여 설치가 되지 않는 경우가 간혹 발생 (마이너한 버전이거나 pypi에 등록되지 않은 경우 .whl파일로 제공) 이 경우에는 해당 패키지 웹사이트에서 OS에 맞는 .whl 파일을 다운로드 받은 후 다음과 같이 실행
- whl파일 Naming Rule : [라이브러리명]-[버전]-[파이썬버전]-[OS].whl (Ex. Pandas-0.21.0-cp35m-win_amd64.whl)
pip install [.whl 파일 경로]
## 또는
python –m pip install [.whl 파일 경로]
5. 패키지 업데이트
pip install numpy --upgrade
6. 패키지 제거
pip uninstall numpy
7. 패키지 다운로드
pip download numpy
8. 패키지 오프라인 설치
pip freeze > requirements.txt
pip install -r requirements.txt
pip download -r requirements.txt
pip install --no-index --find-links="./" -r .\requirements.txt