Code Note
[python] pip로 폴더 내 모든 whl 파일 설치하기(사내망, 보안)
Woomii
2022. 5. 5. 01:36
728x90
반응형
보안 등의 이유로 cmd 창에서 pip install을 사용할 수 없는 경우가 있다.
이 때 pip install 명령어가 사용가능한 환경에서(ex> 개인 PC, 로컬 PC 등)
pip install 을 사용할 수 없는 경우(ex> 사내망 등) 수많은 패키지와 디펜던시들을 편하게 설치할 수 있는 방법을 찾아 공유드립니다.
1. 사용가능한 환경에서 pip download [패키지명] 명령어 실행
2. #1에서 받아온 whl 파일들을 copy&paste 후 해당 폴더에서 아래 명령어를 실행
In Windows cmd you can use a for loop to do this:
for %x in (dir *.whl) do python -m pip install %x
출처
https://stackoverflow.com/questions/43314517/how-to-install-multiple-whl-files-in-cmd
How to install multiple whl files in cmd
I know how to install *.whl files through cmd (the code is simply python -m pip install *so-and-so-.whl). But since I accidentally deleted my OS and had no backups I found myself in the predicament...
stackoverflow.com
반응형