7

I read through the descriptions of each command, but the descriptions for each command were exactly the same, so I didn't understand how those two commands work differently in Unix-like systems.

Could anyone explain the difference?

2
  • What disto are you using? They are actually symbolic links pointing to the specific version commands. You can do a which python and which python3 and then view the values in that folder to see. Commented Apr 30, 2020 at 10:32
  • @DaveStSomeWhere sorry didn't understood what disto is. isn't the which just shows up directory of files? Commented Apr 30, 2020 at 10:36

1 Answer 1

12

The Python3 command was introduced because the python command pointed to python2. Since then, Python3 has become the default and thus python points to python3 on most but not all systems. So, most developers explicitly use python2 and python3 as to not run into issues on other systems.

Sign up to request clarification or add additional context in comments.

2 Comments

So what they represent is just a difference version of python?
Yes, and more than that it protects legacy Python 2 applications, which are in many distributions, from breaking when they are invoked with a Python 3 interpreter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.