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