[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python Alternatives?



Joe Pfeiffer <pfeiffer@cs.nmsu.edu> writes:

> Ben Finney <bignose@debian.org> writes:
>
> > The policy for Python in Debian requires that “/usr/bin/python’ is
> > the default Python 2 interpreter, and ‘/usr/bin/python3’ is the
> > default Python 3 interpreter.
> >
> > There is no “default Python interpreter” in Debian. Python 2 and
> > Python 3 are incompatible run-time systems.
>
> snowball:518$ ls -l /usr/bin/python

You're requesting the default Python 2 interpreter.

> lrwxrwxrwx 1 root root 9 Jun  3  2016 /usr/bin/python -> python2.7*

On that system, the default Python 2 interpreter is Python 2.7.

> python2.7 is the default python on my system for any reasonable value of
> "default".

That's a reasonable interpretation of “default”.

But that's not a reasonable interpretation of “the default Python
interpreter”, because on Debian, the Python interpreter is always
distinct for each incompatible major version. The major versions don't
default to anything else; you have to explicitly choose one.

It so happens, by historical accident, that ‘/usr/bin/python’ is the
name for Python 2's interpreter. It is not the name for any other Python
interpreter version, and it is not “the default Python interpreter”.

If you want Python 2, you invoke the interpreter named ‘python’. If you
want Python 3, you invoke the interpreter named ‘python3’. You don't
have the option not to choose; there is no default major version of
Python in Debian.

-- 
 \      “It's up to the masses to distribute [music] however they want |
  `\    … The laws don't matter at that point. People sharing music in |
_o__)        their bedrooms is the new radio.” —Neil Young, 2008-05-06 |
Ben Finney


Reply to: