• 技术文章 >后端开发 >Python教程

    linux 下实现python多版本安装实践

    2016-06-06 11:20:25原创517

    使用pythonbrew

    代码如下:


    easy_install pythonbrew
    [root@li637-23 schirm]# pythonbrew_install

    Well-done! Congratulations!

    The pythonbrew is installed as:

    /root/.pythonbrew

    Please add the following line to the end of your ~/.bashrc

    [[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc"

    After that, exit this shell, start a new one, and install some fresh
    pythons:

    pythonbrew install 2.7.2
    pythonbrew install 3.2

    For further instructions, run:

    pythonbrew help

    The default help messages will popup and tell you what to do!

    Enjoy pythonbrew at /root/.pythonbrew!!
    [root@li637-23 schirm]# vim /root/.pythonbrew
    [root@li637-23 schirm]# . ~/.bashrc
    [root@li637-23 schirm]# pythonbrew install 2.7.2
    Downloading Python-2.7.2.tgz as /root/.pythonbrew/dists/Python-2.7.2.tgz
    ######################################################################## 100.0%
    Extracting Python-2.7.2.tgz into /root/.pythonbrew/build/Python-2.7.2

    This could take a while. You can run the following command on another shell to track the status:
    tail -f "/root/.pythonbrew/log/build.log"

    Installing Python-2.7.2 into /root/.pythonbrew/pythons/Python-2.7.2

    怎么样小伙伴们,是不是很简单,有相同需求的小伙伴们自己参考下吧

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
    上一篇:python求列表交集的方法汇总 下一篇:自己动手写 PHP MVC 框架(40节精讲/巨细/新人进阶必看)

    相关文章推荐

    • python传递参数方式小结• 编写自定义的Django模板加载器的简单示例• Python代码的打包与发布详解• 十个Python程序员易犯的错误
    1/1

    PHP中文网