在linux下安装python 2.7.8,安装方法: #(1)python2.7安装 cd /opt/ansible tar xvzf Python-2.7.8.tgz cd Python-2.7.8 ./configure --prefix=/usr/local make make install # 将python头文件拷贝到标准目录,以避免编译ansible时,找不到所需的头文件 cd /usr/local/include/python2.7 cp -a ./* /usr/local/
1.下载python2.7.x
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
2.解压并编译安装
tar -zxvf Python-2.7.6.tgz && cd Python-2.7.6 && ./configure && make all && make install && make clean && make distclean
3.检查安装
/usr/local/bin/python2.7 -V
4.建立软连