Centos 6.5安装python3.5.1

查看python的版本

 

[plain] view plain copy
 
 print?
  1. #python  -V    
  2. Python 2.6.6  


1.下载Python-3.5.1

[plain] view plain copy
 
 print?
  1. #wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz


2.解压 

[plain] view plain copy
 
 print?
  1. #tar -zxf Python-3.5.1.tgz 


3.更改工作目录

[plain] view plain copy
 
 print?
  1. #cd Python-3.5.1  


4.安装

[plain] view plain copy
 
 print?
  1. #./configure  (这一句如果报错,需要运行yum install gcc)
  2. #make        
  3. #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.
>>>
 
posted @ 2016-09-11 01:27  lvmememe  阅读(1258)  评论(0编辑  收藏  举报