更换ubuntu的root的默认python版本
總共兩條命令
update-alternatives --config python
?
# update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
? Selection ? ?Path ? ? ? ? ? ? ? ?Priority ? Status
------------------------------------------------------------
? 0 ? ? ? ? ? ?/usr/bin/python3 ? ? 150 ? ? ? auto mode
* 1 ? ? ? ? ? ?/usr/bin/python2 ? ? 100 ? ? ? manual mode
? 2 ? ? ? ? ? ?/usr/bin/python2.7 ? 1 ? ? ? ? manual mode
? 3 ? ? ? ? ? ?/usr/bin/python3 ? ? 150 ? ? ? manual mode
?
?
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 160
注意啊,最后這個(gè)160是用來修改優(yōu)先值的,
上述第二條命令的優(yōu)先值必須在第一條命令的優(yōu)先值中最大,才能順利更換python的默認(rèn)版本。
總結(jié)
以上是生活随笔為你收集整理的更换ubuntu的root的默认python版本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 保险凭证号是保险单号吗 保险凭证号和保险
- 下一篇: Flink SQL Client注册Py