Shell:
mkdir /home/download
cd /home/download
yum -y update
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel
wget https://www.python.org/ftp/py...
tar -xvf Python-3.7.2.tar.xz
cd Python-3.7.2
./configure --prefix=/usr/local/python3
make && make install
echo "[global]
index-url = https://pypi.doubanio.com/simple
trusted-host = pypi.doubanio.com" > ~/.pip/pip.conf
pip3 install --upgrade pip
Git:
https://github.com/WuDuKangBa...
Bash:
curl https://raw.githubusercontent.com/WuDuKangBaZi/Python3.7.2-Auto-Install/master/py\_auto\_install.sh | bash
Notes:
没有更换python3命令到Python下
安装后执行也是python3 和 pip3
如果需要更换python命令 可以查看GitHub的ReadMe