查看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.
>>>
 

相关文章:

  • 2021-08-11
  • 2021-04-06
  • 2021-07-28
  • 2021-06-25
  • 2021-12-09
  • 2021-07-30
  • 2021-08-23
  • 2021-08-27
猜你喜欢
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-06-13
  • 2021-05-18
  • 2021-12-05
相关资源
相似解决方案