基础服务系列-Centos7 安装Python3.7

Python 3.7.0 is the newest major release of the Python language, and it contains many new features and optimizations.

简介

官方centos镜像为基础,安装Python3.7.0

更换yum源

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

安装wget

yum install wget

下载

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

安装

  1. 解压

    tar -xvf Python-3.7.0.tgz

  2. 移动

    mv Python-3.7.0 /usr/local

  3. 执行

    ./configure

    configure: error: no acceptable C compiler found in $PATH

    yum install gcc

    ./configure

  4. 编译

    yum install make

    make

  5. 安装

    make install

    zipimport.ZipImportError: can't decompress data; zlib not available yum install zlib* -y

    ModuleNotFoundError: No module named '_ctypes'

    yum install libffi-devel -y

    make install

  6. 建立软连接

    ln -s /usr/local/Python-3.7.0/python /usr/bin/python3

  7. 验证

保存镜像

参考

CentOS7安装Python3.7

Centos7- wget未找到命令,there are no enabled repos 解决办法

Install Python PIP on CentOS7

转载于:https://my.oschina.net/wuxinshui/blog/3076911

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值