Symbolic links: why are they so bad?
Why is using symbolic links to change the default python version on Ubuntu considered as being unsafe ?
I read this information on several forums but did not find an answer as to why is this so.
In most systems, python
refers to python2 and python3
refers to python3.
The reason a symbolic link created with python
to refer to python3
is considered unsafe is because this will cause applications that used python
to refer to python2
to crash or misbehave. This is mainly because python3 is not backward compatible with python2; they are very much different in syntax as well as semantics.
You should rather use aliases as a better alternative to use python to refer to python3.
symbolic links in general are not bad, it depends how you use them.
It's not good to change the default python
, because many programs use python 2
rather than python 3
. Why don't you just use the python3
command when you need it without making any changes .