码迷,mamicode.com
首页 > 编程语言 > 详细

centos7 安装 python3.7

时间:2020-03-20 12:58:31      阅读:64      评论:0      收藏:0      [点我收藏+]

标签:enable   bin   centos   测试   shel   curses   nss   环境   conf   

  • 安装依赖

    yum -y groupinstall "Development tools"
    
    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
    
    yum install libffi-devel -y
  • 下载安装包

    wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
    tar -xvf  Python-3.7.0.tar.xz
  • 切入安装包

    cd Python-3.7.0
  • 配置

    ./configure --enable-optimizations  --prefix=/usr/local/python3
  • 编译和编译安装

    make && make install
  • 建立软连接

    ln -s /usr/local/python3/bin/python3.7  /usr/bin/python3
    ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
  • 测试

    > python3
    > pip3 list
  • 至此python3.7的环境搭建成功

centos7 安装 python3.7

标签:enable   bin   centos   测试   shel   curses   nss   环境   conf   

原文地址:https://www.cnblogs.com/wuxiaoshi/p/12530850.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!