What is the difference between /usr/bin/python3 and /bin/python3

4.3k Views Asked by At

So, I was using visual studio code and wanted to see what option do I have for interpreter in vscode in my Ubuntu 21.04 machine and what I found are these options. First is the virtual environment python interpreter and I guess 2nd is the system python interpreter so what is the 3rd interpreter option that I am getting and this is my question.

2

There are 2 best solutions below

0
On BEST ANSWER

From Linux file-hierarchy manual:

/bin/, /sbin/, /usr/sbin/

These compatibility symlinks point to /usr/bin/, ensuring that scripts and binaries referencing these legacy paths correctly find their binaries.

In my computer (Ubuntu 20.04) /bin/python3 is a link to /usr/bin/python3.8. Basically, the link /bin/python3 exists so that legacy programs that look for the python executable in /bin work.

0
On

Both /usr/bin/python3 and /bin/python3 are symbolic links to the same Python interpreter. So the only difference between them is path.