美文网首页
centOS 安装python3

centOS 安装python3

作者: fangtang0101 | 来源:发表于2018-12-21 13:25 被阅读12次

centOS 默认是已经装了 python2 的版本

本节介绍 CentOS7使用Yum源安装Python3.6
IUS软件源中包含了Python3.6,可以使用IUS软件源安装Python3.6

  • 安装IUS软件源
#安装EPEL依赖
sudo yum install epel-release

#安装IUS软件源
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
  • 安装Python3.6
sudo yum install python36u
//安装Python3完成后的shell命令为python3.6,为了使用方便,创建一个到python3的符号链接
sudo ln -s /bin/python3.6 /bin/python3
  • 安装pip3
sudo yum install python36u-pip
//安装pip完成后的shell命令为pip3.6,为了使用方便,创建一个到pip3的符号链接
sudo ln -s /bin/pip3.6 /bin/pip3
  • 检查版本
python -V
python3 -V
pip3 -V

参考文章 https://www.yuzhi100.com/tutorial/centos/centos-anzhuang-python36

相关文章

网友评论

      本文标题:centOS 安装python3

      本文链接:https://www.haomeiwen.com/subject/ptumkqtx.html