1)安装devtoolset yum groupinstall "Development tools" 2)安装编译Python需要的包包 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel 3)下载并解压Python 2.7.9的源代码 mkdir soft cd soft wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz //https://www.python.org/ftp/python/2.7.9/ tar -xzvf Python-2.7.9.tgz cd Python-2.7.9 4)编译与安装Python 2.7.9 ./configure --prefix=/usr/local make && make altinstall
时间: 2024-10-13 22:56:11