Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 22 down vote accepted

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.

share|improve this answer

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 .

share|improve this answer
5  
Errrr..... paython? (Three times as well) :) –  Wilf May 28 at 15:41
1  
@Wilf sadly no more! Also see github.com/abunsen/Paython –  WaelJ May 28 at 17:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.