본문 바로가기
개발일기/파이썬

centOS / Python 3.7 설치하기 - yum, gcc, openssl, bzip, libffi 사용

by 프로그래머콩 2019. 12. 6.

 

 

1. 앞서 필요한 것들 설치하기
# yum install gcc openssl-devel bzip2-devel libffi-devel

 

 

 

2. Python3.7 설치
# cd /var
# mkdir www
# cd www
# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

설치 완료

 

 

 

3. 패키지 압축 풀기 & 원래 압축 패키지는 필요 없어졌으므로 삭제하기 (rm 명령어)
# tar xzf Python-3.7.4.tgz
# rm Python-3.7.4.tgz 

압축 풀기
압축 패키지 삭제

 

 

 

4. Python3.7 설치
# cd Python-3.7.4
# ./configure --enable-optimizations
# make altinstall

(configure 끝나고) make altinstall 준비 완료

 

(꽤 오래걸림 주의)

 

5. 버전 확인 (설치 확인)
# python3.7 -V