###下载压缩包
wget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tar.xz
###解压
tar -xf Python-3.6.7.tar.xz
###配置安装路径
./configure --prefix=/usr/local/python3
###编译安装
make && make install
#配置软连接
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
报错:ln: failed to create symbolic link '/usr/bin/python3': File exists
则后面加上-f参数覆盖:ln -sf /usr/local/python3/bin/python3.6 /usr/bin/python3
###删除
rm -rf