1. 获取源文件

wget https://www.python.org/ftp/python/2.7/Python-2.7.tgz (或  wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz)

tar -vxf Python-2.7.tgz

cd Python-2.7

2. 安装

./configure

make

make install

3. 检查

python -V

Python 3.5.2 (default, Apr 21 2018, 10:12:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

  

 posted on 2018-07-18 21:57  明文的文  阅读(93)  评论(0编辑  收藏  举报