一. 打开终端,输入:wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0b4.tgz 下载完毕后 输入解压命令:tar –zxvf Python-3.5.0b4.tgz 切换到解压的目录:cd Python-3.5.0b4 接下来就是安装: ./configure #如果没成功则是少依赖包 yum -y install gcc make make install #make && make install long long
1.下载python wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz 2.解压.编译安装 tar -zxvf Python-2.7.9.tgz cd Python-2.7.9 ./configure --prefix=/usr/local/python-2.7.9 make make install 3.系统自带了python版本,我们需要为新安装的版本添加一个软链 ln -s /usr/local/python-2.7
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz tar -zxvf Python-3.7.1.tgz cd Python-3.7.1 创建安装目录: mkdir /usr/local/python3.7编译: ./configure –prefix=/usr/local/python3.7安装: make && make install