Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Ben Finney Newsgroups: linux.debian.maint.python Subject: Re: Safest way to set python3 as default for `python` Date: Wed, 18 Jul 2018 03:40:02 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Jul 18 01:37:05 2018 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.957 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LDO_WHITELIST=-5, RDNS_NONE=0.793] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -6.1 X-Injected-Via-Gmane: http://gmane.org/ Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney Cancel-Lock: sha1:hICCtOJ1keSVS8rRJHAEYlcIyF8= X-Mailing-List: archive/latest/16122 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/85d0vl8guw.fsf@benfinney.id.au Approved: robomod@news.nic.it Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 18 Jul 2018 11:36:39 +1000 X-Original-Message-ID: <85d0vl8guw.fsf@benfinney.id.au> X-Original-References: X-Original-X-Complaints-To: usenet@blaine.gmane.org Xref: csiph.com linux.debian.maint.python:10703 Bastian Venthur writes: > sorry if this question has been asked before. What is the currently > recommended way to make `python` point to `python3`? I'd like to have > it set on a system default level if possible. At a system default level, in Debian, the command ‘python’ (if it is installed) invokes the default Python 2 interpreter. Based on existing discussions I am confident there will not be a recommendation for a ‘python’ command to invoke anything except the default Python 2 interpreter, until long after Debian ceases support for Python 2 — and there is no current plan to drop Python 2 support in Debian. If you want a ‘python’ command at the system default level with different behaviour from that today, that's going against recommendations so I think you won't find a recommended way to have different behaviour. To have a command with custom behaviour, the recommendation is the general one: put an executable file at ‘/usr/local/bin/python’ with whatever behaviour you want. -- \ “But Marge, what if we chose the wrong religion? Each week we | `\ just make God madder and madder.” —Homer, _The Simpsons_ | _o__) | Ben Finney