CentOS安装Python3

安装依赖包

  yum -y groupinstall development

  yum install -y libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel

下载tgz包并解压

  tar xf Python-3.x.x.tgz

进入解压后文件夹

  cd Python-3.x.x

配置安装路径并安装

  ./configure --prefix=/usr/local/python3

  make && make install

添加环境变量

  cd /etc/profile.d

  echo ‘export PATH=$PATH:/usr/local/python3/bin/‘ > python3.sh

CentOS安装Python3

上一篇:iOS 多渠道打包 编译脚本


下一篇:【猜代码赢大奖】又是一年四月一,代码整人别客气