在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/
安装python2.7 wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz tar xvf Python-2.7.8.tgz cd Python-2.7.8 ./configure --prefix=/usr/local/python27 make make install mv /usr/bin/python /usr/bin/python_old ln -s /usr/local/python27/bin/python