当Linux装有两个以上Python版本时,我们有时会用到某个特定版本,假设我们希望使用 python3.6来替代python2.7作为默认版本:

update-alternatives --list python
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐