[Python-Dev] Support the /usr/bin/python2 symlink upstream

James Y Knight foom at fuhm.net
Thu Mar 3 02:47:28 CET 2011

On Mar 2, 2011, at 7:01 PM, Kerrick Staley wrote:
> As an aside, this whole thing started when I tried installing ROS, only to find that it made assumptions about /usr/bin/python, which points to python3 on my Arch Linux system.

Yep, exactly that kind of problem is why I think it's an absolutely terrible idea to switch the /usr/bin/python link to point to python3 (ever). When python 2.x is dead, I really don't see what the problem is with only having a "python3" binary, and no "python" binary.

That said, since the conclusion here is that it *IS* a good idea to point "python" to a python3 interpreter eventually, I guess it's better to add the python2 link 4 years late than never.

A lot of pain could've been spared if python 2.x had started installing python2 years ago, so by now everyone would depend on it existing. But oh well, too late for that, unless someone has a time machine handy.

>  I went in search of documentation for the python2/python3 convention so that I could make the ROS developers aware of it and help them to follow it, only to find out that no such convention actually exists.

> I'm sure there are many other users out there that are frustrated by similar issues;

Well, so far, only those unfortunate users of Arch Linux...but considering the consensus here, I'm sure there will be more in the future.

> supporting a python2/python3 convention on all distros as well as in scripts would solve these issues without creating further problems and without the need for a slow consensus to be reached on what /usr/bin/python should be.

Well, it will definitely will create problems: scripts may start using the python2 name to be compatible with Arch Linux (or anyone else who sets python->python3), but the python2 link won't exist on any existing from-source Python install, or OSX, or Debian, or Ubuntu. And it likely will not start existing on some of those systems for years to come, even if the PEP is accepted today. 

Perhaps that problem is considered less of a problem than the problem Arch Linux users have today (as you point out, sysadmins can create the link themselves), but it still is a problem.

As to the PEP itself: you should specify an action item that the Python 2.7.N upstream makefile be modified to install a python2 symlink, as well.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110302/fe0e659f/attachment.html>

More information about the Python-Dev mailing list