본문 바로가기
IT

[Python]파이썬 온라인에서 작업하던 패키지 전체 오프라인 환경으로 이관하는 방법

by 쪼이빠빠 2023. 2. 25.
728x90
반응형

1. 온라인 환경 수행 절차
 - 패키지 설치
     pip install 패키지명
 - 리스트 생성
     pip freeze > requirements.txt
 - 모듈 리스트 다운로드
     pip download -r requirements.txt

2. 오프라인 환경 수행 절차
 - 패키지 파일 및 리스트 이관
 - 오프라인 환경 패키지 일괄 설치
     python -m pip install --no-index --find-links="./" -r requirements.txt
 - 오프라인 환경 패키지 개별 설치
     python -m pip install --no-index --find-links="./" 패키지명.whl

3. 패키지 설치
python -m pip install --no-index --find-links="./" -r requirements.txt 


반응형

댓글