问题
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