1.首先更新yum源
sudo yum -y update
2.然后安装yum-utils,一组扩展和补充yum的实用程序和插件
sudo yum -y install yum-utils
3.最后,我们将安装CentOS开发工具,用于允许您从源代码构建和编译软件
sudo yum -y groupinstall development
4.安装Python3
安装EPEL:
sudo yum -y install epel-release
5.安装IUS软件源
老版---- sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm 新版---sudo yum install https://repo.ius.io/ius-release-el7.rpm
6.安装Python3.6:
sudo yum -y install python36u
7.安装pip3:
sudo yum -y install python36u-pip
8.可以检查一下安装情况,分别执行命令查看
python3.6 -V pip3.6 -V
9.运行python 文件 后台运行
nohup python3 test2.py &