开发者社区> 问答> 正文

在 CentOS 7 通过 Software Collections 源安装 python3.5

云友 chenglijie 想用 python3 ,所以用写此帖。

CentOS 7里默认的python版本是2.7.5,如需使用python3.5,可以通过 Software Collections 源安装。

过程:

1. yum install centos-release-scl # 安装 Software Collections 源


2. yum install rh-python35 # 安装 python3.5


3. scl enable rh-python35 bash # 启用 python3.5


4. python -m http.server 8082 # http访问测试





5. exit # 如需返回 python2.7,可退出


参考:

  • https://www.softwarecollections.org/en/scls/rhscl/rh-python35/
  • https://coolshell.cn/articles/1480.html

展开
收起
dongshan8 2017-11-02 12:40:55 3583 0
1 条回答
写回答
取消 提交回答
  • 您的无私奉献精神值得我们学习!向您致敬!

    -------------------------

    您的无私奉献精神值得我们学习!向您致敬!

    2018-01-25 11:16:13
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
From Python Scikit-Learn to Sc 立即下载