[python] pip install 안될때
in Tip on Pip
일반적인 로컬환경이 아닌 경우 네트워크 문제로 pip install 이 안되는 경우가 있다.
이경우 -i 옵션을 추가해준다
실패
$pip install {모듈명}
Looking in indexes: http://0.0.0.0/pypi/main/simple
collecting {모듈명}
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection by 'NewConnectionError('<pip._veba592a2400>: Failed to establish a new connection: [Errno 111] 연결이 거부됨',)': /pypi/main/simple/{모듈명}/
...
성공
$pip install {모듈명} -i https://pypi.org/simple --trusted-host=pypi.org