centos7.4-python3-yum安装

Catalogue
  1. 1. CentOS7 yum 安装 python3.6

CentOS7 yum 安装 python3.6

参考网址:

https://dev.to/lechatthecat/how-to-install-python3-in-centos7-1bk6

https://www.yuzhi100.com/tutorial/centos/centos-anzhuang-python36

  1. 安装IUS软件源

    1
    2
    3
    4
    5
    #安装EPEL依赖
    sudo yum install epel-release

    #安装IUS软件源
    sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
  2. 安装python3.6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
    #注意后面的libs和devel 需要安装好
    sudo ln -s /bin/python3.6 /bin/python3
    #创建一个到python3的符号链接
    sudo ln -s /bin/pip3.6 /bin/pip3
    #创建一个到pip3的符号链接
    python3 --version
    #检查pyhton3 是否正常工作
    pip3 --version
  3. 安装GCC 和开发工具套装、

    参考网址

    https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/

    1
    2
    yum group list  #列出软件组
    yum group install "Development Tools"

    检查

    1
    2
    whereis gcc
    gcc --version