美文网首页
centos7 安装 python3.7

centos7 安装 python3.7

作者: 魔思科技 | 来源:发表于2018-09-03 23:18 被阅读10次
    1. 安装libffi-devel依赖
    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make
    
    1. 下载、解压压缩包
    wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
    tar -xvJf Python-3.7.0.tar.xz
    cd Python-3.7.0
    
    1. 编译安装
    ./configure --prefix=/usr/local/python3
    make && make install
    
    1. 创建软链接
    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
    
    1. 运行
    python3
    

    相关文章

      网友评论

          本文标题:centos7 安装 python3.7

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