请注意,本文编写于 2430 天前,最后修改于 1859 天前,其中某些信息可能已经过时。
前言
由于要配置安装一下萌咖大佬和sxyz大佬用Python3写的OneDrive目录程序OneList。而CentOS7系统自带的是Python2.7,所以要在主机上配置Python3环境。
CentOS7安装Python3有很多种方法,这里推荐使用yum源进行安装,方便以后的软件管理。
安装IUS软件源
IUS软件源中包含了Python3.6,可以使用IUS软件源安装Python3.6
#安装EPEL依赖
yum install epel-release
#安装IUS软件源
yum install https://centos7.iuscommunity.org/ius-release.rpm安装Python3.6
yum install python36u安装Python3完成后的shell命令为python3.6。那么我为了使用方便,创建了一个到python3的符号链接
ln -s /usr/bin/python3.6 /usr/bin/python3安装pip3
安装完成python36u并没有安装pip,安装pip
yum install python36u-pip安装pip完成后的shell命令为pip3.6,为了使用方便,创建一个到pip3的符号链接
ln -s /usr/bin/pip3.6 /usr/bin/pip3