美文网首页百人计划7组专题百人计划
CentOS7简易安装及使用Python3

CentOS7简易安装及使用Python3

作者: Yvanna_15 | 来源:发表于2017-06-05 21:04 被阅读32次

    1)yum install epel-release  //安装epel-release源

    2)yum install python34  //安装Python3.4

    3)vim.bashrc

    4)按下字母i键进入编辑模式,加入命令alias python='python3.4'设置指令的别名,按Esc键退出并输入:wq保存配置

    5)source.bashrc  //使修改立即生效

    6)python  //输入指令

    7)touch hell.py  //新建文件

    8)vim hell.py  //编写Python代码,打印hello world

    9)python hell.py  //运行程序,输出hello world


    相关文章

      网友评论

      本文标题:CentOS7简易安装及使用Python3

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