用Linux自带的下载工具wget下载(当前的最新版本python3.6.0),进入个人用户下面的Downloads下cd ~/tmp/wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz12
开始下载,下载完成后新建一个安装软件的目录:mkdir /usr/local/python3.61
解压安装包:tar -xvzf Python-3.6.0.tgz 1
配置安装路径: 执行错误检查空格./configure-prefix =/usr/local/python3.6/make
make install123或者执行# make && make install1
安装成功,把旧版本改名或删除:我这有两个旧的pythonmv /usr/bin/python2 /usr/bin/python_2.7old1
mv /usr/bin/python2.6 /usr/bin/python_3.4old212
然后链接自己安装的python到默认路径:ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python 1