
LinuxMint and Ubuntu installs python2.7 and python3.5 as default. But I want 2 install the latest Python3.6 and set it as the default python.
check current python versions
use follow commands:
|
|
install python3.6 into Linux
|
|
check installed python3.6
|
|
old python3.5 is still exist, and it is still the default python3.
to change python3.6 just installed as the default python3, we need the tool ‘’’update-alternatives’’’.
change default python3
|
|
why like this? Cauz we didn’t maintained them.
do as follows:
|
|
recheck alternatives:
|
|
switch 2 the latest python3
|
|
then specify the latest python3 as default by select numbers.
swith python2 2 python3
ps: do not do anything on python2, as many system tools may rely on it.
if you want 2 use python3 instead of python2, suggest you use virtualenv.
But, if you really really want 2 change python2 2 python3 on your system, do as follows
|
|
then
|
|




近期评论