服务器远程下载,使用命令:wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
完整的第二种安装python-3.6.1的方法
[root@VM_58_11_centos ~]# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz 获取安装包
[root@VM_58_11_centos ~]# tar -zxf Python-3.6.1.tgz 解压缩[root@VM_58_11_centos ~]# cd Python-3.6.1 定位到文件夹#查看安装包文件[root@VM_58_11_centos Python-3.6.1]# lsaclocal.m4 config.sub configure.ac Grammar install-sh LICENSE Makefile.pre.in Modules Parser PCbuild Python setup.pyconfig.guess configure Doc Include Lib Mac Misc Objects PC pyconfig.h.in README Tools[root@localhost Python-3.6.1]# ./configure 添加配置[root@localhost Python-3.6.1]# make 编译源码[root@localhost Python-3.6.1]# make install 执行安装测试
[root@VM_58_11_centos Python-3.6.1]# python3Python 3.6.1 (default, May 3 2017, 17:10:54)[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linuxType "help", "copyright", "credits" or "license" for more information.>>>