Development/Python
[Centos7][Python3.7] How to install Python3.7 in Centos7
Best Junior
2020. 1. 8. 14:10
python3.7 버전 설치 방법 with wget tgz & configure
[ 작업환경 ]
Centos 7.5
Python3.7
1. 설치 파일 다운로드
$ cd /usr/src
$ wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
/usr/src 위치에 Python-3.7.4.tgz 다운로드
2. 압축 풀기
$ tar xvf Python-3.7.4.tgz
3. Python-3.7.4 설치 진행
$ ./configure --enable-optimizations
시간이 다소 소요될 수 있습니다.
4. 기존의 /usr/bin/python 보호하며 추가설치 진행
$ make altinstall
시간이 다소 소요될 수 있습니다.
5. 정상 설치 여부 확인
본 위치에 설치된 파일들 중 python 파일이 python-3.7.4 임을 확인
$ ./python -V
6. python3 커맨드로 해당 python 불러오도록 설정
$ cd /usr/bin
$ ln -s /usr/src/Python-3.7.4/python python3
$ python3 -V
정상적으로 설치된 python-3.7.4 불러오는지 확인하여 이상없으면 완료입니다.