查看python的版本
- #python -V
- Python 2.6.6
1.下载Python-3.5.1
- #wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
2.解压
- #tar -zxf Python-3.5.1.tgz
3.更改工作目录
- #cd Python-3.5.1
4.安装
- #./configure (这一句如果报错,需要运行yum install gcc)
- #make
- #make install
- 测试
[root@localhost Python-3.5.1]# python3 Python 3.5.1 (default, Jun 27 2016, 07:47:54) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>