首先需要安装gcc编译器:
yum -y install gcc
yum -y installgcc-c++
yum install make
安装完成后,下载并编译python:
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar -xfPython-2.7.10.tgz
cd Python-2.7.10
./configure--prefix=/usr/local
make && makeinstall
进入python解释器:
python
退出:
exit()