当前位置: 移动技术网 > IT编程>脚本编程>Python > linux 下实现python多版本安装实践

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

2019年03月24日  | 移动技术网IT编程  | 我要评论

win7 oem,tcl电视质量,于之飞

使用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

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

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网