美文网首页
CentOS 7.6 安装 Python3.7.3

CentOS 7.6 安装 Python3.7.3

作者: Aim走风 | 来源:发表于2020-05-06 14:02 被阅读0次

    下载

    wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
    

    解压

    tar -zxvf Python-3.7.3.tgz
    

    安装依赖组件

    yum -y  install openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel
    yum -y  install libpcap-devel xz-devel gcc kernel-devel kenel-headers bzip2 bzip2-devel
    yum -y install gcc-c++ zlib zlib-devel
    yum -y install libffi-devel 
    

    编译安装

    cd Python-3.7.3
    ./configure --prefix=/usr/local/python3
    make && make install
    

    添加软连接

    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    ln -s /usr/local/python3/bin/pip3  /usr/bin/pip3
    

    相关文章

      网友评论

          本文标题:CentOS 7.6 安装 Python3.7.3

          本文链接:https://www.haomeiwen.com/subject/ndfwghtx.html