Python shebang policy

Richard Laager rlaager at
Tue Mar 20 20:48:37 UTC 2018

On 03/20/2018 02:58 PM, Gary E. Miller via devel wrote:
> How does it handle multiple Pythons at the same time?

Python is a specific example of the generalized problem of wanting two
different versions of the same software installed at the same time. That
generalized problem is solved by versioning executable names (and
anything else necessary, like config/library directories).

/usr/bin/python  is Python 2
/usr/bin/python3 is Python 3

More specifically, these are symlinks to, for example, /usr/python/2.7
and /usr/bin/python3.5. It's thus possible to have multiple minor
versions of the same major version installed. I haven't paid close
attention, but I'd imagine that scenario only exists during minor
version transitions and not in a released version of Debian.

For more reading:

The ntpsec package patch is just changing:
#!/usr/bin/env python

If ntpsec was setting the shebang lines from a configure parameter, I
could use that and avoid the patch. This would be cleaner. But, it's not
like the patch is that big of a deal either.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the devel mailing list