Python 연습/1. Python 설치와 실습 - 아나콘다

Q_01_08. PIP(Python Package Index) 란 무엇인가

Python통컨 2025. 3. 20. 17:14

PIP(Python Package Index)은 Python 소프트웨어 패키지의 설치, 업그레이드, 제거를 쉽게 해주는 패키지 관리 시스템입니다. PIP는 Python 패키지 관리 툴로 널리 사용되며, PyPI(Python Package Index)라는 중앙 저장소에서 패키지를 다운로드하고 설치합니다.

PIP의 주요기능은 다음과 같습니다.

⚫ 패키지 설치: 
PIP를 사용하면 간단한 명령어로 Python 패키지를 설치할 수 있습니다. 예를 들어, pip install 패키지명 명령어를 사용하여 원하는 패키지를 설치할 수 있습니다.

⚫ 패키지 업그레이드: 
이미 설치된 패키지를 최신 버전으로 쉽게 업그레이드할 수 있습니다. 예를 들어, pip install --upgrade 패키지명 명령어를 사용합니다.

⚫ 패키지 제거: 
더 이상 필요하지 않은 패키지를 제거할 수 있습니다. 예를 들어, pip uninstall 패키지명 명령어를 사용합니다.

⚫  의존성 관리: 
설치된 패키지의 의존성을 자동으로 관리합니다. 즉, 특정 패키지가 필요로 하는 다른 패키지들도 자동으로 설치됩니다.

⚫  환경 설정: requirements.txt 파일을 사용하여 특정 프로젝트에서 필요한 패키지 목록을 쉽게 관리할 수 있습니다. 이 파일에 나열된 패키지를 한 번에 설치할 수 있습니다.

설치된 파이썬 폴더로 이동합니다.
C:\Users\USER>d:
D:>cd python_3.12.1

pip 버전 - pip 24.1.1

D:\python_3.12.1> pip --version   
pip 23.2.1 from d:\anaconda3\Lib\site-packages\pip (python 3.11)

pip 업데이트 - pip install --upgrade pip -> pip 24.1.1

D:\python_3.12.1> pip install --upgrade pip

Requirement already satisfied: pip in d:\anaconda3\lib\site-packages (23.2.1)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl.metadata
  Downloading pip-24.1.1-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.1.1-py3-none-any.whl (1.8 MB)
   ---------------------------------------- 1.8/1.8 MB 2.1 MB/s eta 0:00:00
ERROR: To modify pip, please run the following command:
d:\anaconda3\python.exe -m pip install --upgrade pip
D:\Python_3.12.1>d:\anaconda3\python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in d:\anaconda3\lib\site-packages (23.2.1)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl.metadata
  Using cached pip-24.1.1-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.1.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Uninstalling pip-23.2.1:
      Successfully uninstalled pip-23.2.1
Successfully installed pip-24.1.1

D:\Python_3.12.1>
D:\Python_3.12.1>pip --version

pip 24.1.1 from d:\anaconda3\Lib\site-packages\pip (python 3.11)

 

D:\Python_3.12.1>