Centos7中安装Python3.8

mtain 2022年05月19日 60次浏览
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
xz -d Python-3.8.0.tar.xz
tar -xvf Python-3.8.0.tar
mkdir /usr/local/python3.8.0
cd Python-3.8.0
./configure --with-ssl --prefix=/usr/local/python3.8.0
make && make install
pip3 install --upgrade pip(升级pip3)
mv /usr/bin/python /usr/bin/python2
python3