Ubuntu Server 16.04 LTS安装Python2

链接:https://www.jianshu.com/p/743967c7ab1b
来源:简书

  Ubuntu 16.04 默认安装Python3,需要手动安装Python2。首先确保已经安装gcc,make。然后就可以按以下步骤安装了:

  1. 下载Python2包,最新的版本为2.7.15
    wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz

  2. 解压缩
    tar -xvf Python-2.7.15.tgz

  3. 准备安装
    cd Python-2.7.15

  4. 安装

./configure
make
make install

参考

Installing the GNU C compiler and GNU C++ compiler

猜你喜欢

转载自blog.csdn.net/chenbingcai/article/details/80254561