Unable to set default python version to python3 in ubuntu

后端 未结 19 1748
遥遥无期
遥遥无期 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:59

    As an added extra, you can add an alias for pip as well (in .bashrc or bash_aliases):

    alias pip='pip3'

    You many find that a clean install of python3 actually points to python3.x so you may need:

    alias pip='pip3.6'
    alias python='python3.6'

提交回复
热议问题