How can i remove python 2.7 as i already have 3.6.5 installed on ubuntu?

廉价感情. 提交于 2020-12-11 00:44:39

问题


i have both 2.7 as well as 3.6.5 installed , at first in ubuntu 18.04 the only python version available was 3.6 but after i installed numpy package, along with it 2.7 got installed as well and it turned into default. Is there any solution so as to make 3.6 the default one instead of 2.7??


回答1:


Open .bashrc file nano ~/.bashrc. Type alias python=python3 on to a new line at the top of the file then save and close the file with ctrl+o and ctrl+x.



来源:https://stackoverflow.com/questions/50186129/how-can-i-remove-python-2-7-as-i-already-have-3-6-5-installed-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!