CentOS python 安装

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

  

猜你喜欢

转载自www.cnblogs.com/liumwen/p/9327013.html