c or linux

[리눅스] pip, pipenv 설치하기

'김용환' 2019. 6. 5. 10:19



centOS 리눅스에서 pip를 설치할 때 단순하게 다음과 같이 실행하면 된다고 하나..



$  yum update


$ yum install epel-release


$ sudo yum install python-pip 




내 환경에서는 계속 에러가 난다.


Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again




그래서 epel과 관련된 인증 이슈인데.. 다음과 같이 실행하면 잘 동작한다.


$ yum clean all


$ yum --disablerepo=“epel” update nss


$ yum remove epel-release --disablerepo=epel


$ yum -y upgrade ca-certificates


$ yum -y upgrade ca-certificates --disablerepo=epel


이제 가상환경과 패키지 설치를 동시에 지원하는 pipenv를 설치한다.


$ sudo -H pip install pipenv --proxy="proxy.google.io:3128"





pip 중요 참고 내용..

sudo pip install pipenv 을 실행할 때 다음과 같은 에러가 발생할 수 있다.


Starting new HTTPS connection (1): pypi.python.org

Incremented Retry for (url='/simple/pip/'): Retry(total=4, connect=None, read=None, redirect=None)

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe8adb61310>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/


이럴 때는 환경변수와 proxy 환경 변수에 영향을 받을 수 있으니..아래와 같이 사용하길 바란다.


$ sudo -H pip install pipenv --proxy="proxy.google.io:3128"