Unable to set default python version to python3 in ubuntu

后端 未结 19 1799
遥遥无期
遥遥无期 2020-11-28 01:38

I was trying to set default python version to python3 in Ubuntu 16.04. By default it is python2 (2.7). I followed below steps :

19条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 01:42

    Simply remove python-is-python2:

    sudo apt purge python-is-python2
    

    And install python-is-python3:

    sudo apt install python-is-python3
    

    It will automate the process of transition to new python3. Optionally you can get rid of remaining packages later:

    sudo apt autoremove && sudo apt autoclean
    

提交回复
热议问题