폐쇄망이나 사내 캐시 목적으로 Nexus Repository 의 PyPI group 저장소를 pip 의 기본 인덱스로 지정한다. 설정 파일 위치는 다음과 같다.[1]
| 범위 | 경로 |
|---|---|
| 전역 | /etc/pip.conf (또는 /etc/xdg/pip/pip.conf) |
| 사용자 | ~/.config/pip/pip.conf (구 경로 ~/.pip/pip.conf 도 읽는다) |
| 가상환경 | $VIRTUAL_ENV/pip.conf |
cat <<EOF | sudo tee /etc/pip.conf
[global]
index=https://my-company/nexus/repository/pypi-group/pypi
index-url=https://my-company/nexus/repository/pypi-group/simple
trusted-host=my-company
EOF
index-url 이 실제 패키지 조회에 쓰이는 값이다 (/simple 끝). index 는 pip search 용이다.trusted-host 는 자체 서명 인증서를 쓸 때 검증을 건너뛰게 한다. 인증서가 정상이면 뺀다.pip config list
pip install --no-cache-dir requests -v 2>&1 | grep -i 'Looking in indexes'
pip — Configuration. 2026-09-20 확인. https://pip.pypa.io/en/stable/topics/configuration/ ↩︎