Ubuntu16.04中切換Python2/3,設置爲Python3爲默認

設置優先級和默認環境:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150

切換版本(注意先把系統默認的python環境切換到python2):

update-alternatives --config python
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章