업무/etc
[Linux] Centos python 3.9.x 버전 설치
sysops
2021. 11. 15. 00:44
728x90
설치 환경 :
- Centos 7
- Centos 8
# yum groupinstall 'development tools' -y
# yum install wget openssl-devel bzip2-devel libffi-devel xz-devel -y
# wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
# tar xvf Python-3.9.6.tgz
# cd Python-3.9.6 && ./configure --enable-optimizations
# make altinstall
# alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.9 1
# alternatives --set python3 /usr/local/bin/python3.9 && echo "2" | alternatives --config python
# /usr/local/bin/python3.9 -m pip install --upgrade pip
# alternatives --install /usr/bin/pip pip /usr/local/bin/pip3.9 1 && alternatives --set pip /usr/local/bin/pip3.9
# python -V && pip -V728x90