On Sat, Jun 25, 2016 at 02:41:04PM +0300, Victor Porton wrote: > For example, if I understand correctly /usr/bin/python on some systems may > mean Python 2.x and on some systems Python 3.x. > > Is there any "standard" to avoid such multiple meanings of an executable > located in the same path of the filesystem? In Debian, are there always more > specific paths like /usr/bin/python2.7 or /usr/bin/python3.1?
/usr/bin/python is right now guaranteed to be the latest Python 2 and /usr/bin/python3 is pointing to the latest Python 3. As I understand it, there are no plans to repoint /usr/bin/python to Python 3, because that would break application's expectations. I am aware that other distributions do this, though, so you might need to autodetect what you are dealing with in this case (e.g. through `python --version'). Kind regards Philipp Kern