Fedora 27安装Python3

Fedora 27安装Python3
Fedora 27安装Python3的具体步骤
  1.安装编译环境
  # yum -y groupinstall 'Development Tools'
  # yum -y install zlib-devel bzip2-devel openssl-devel

  2.下载Python3
  这里下载3.6.4版本
  # wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz

  3.编译安装
    解压xz:
  # xz -d Python-3.6.4.tar.xz

    解压tar:
  # tar xvf Python-3.6.4.tar

    切换到源码目录:
  # cd Python-3.6.4/

    编译、安装:
  # ./configure && make && make install

  4.建立Python3的软链接
  # rm -f /usr/bin/python; ln -s /usr/local/bin/python3 /usr/bin/python

  5.查看Python版本
  # python --version