From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Python 2 and Python 3 ? Date: Fri, 23 Feb 2018 19:26:44 +0100 Message-ID: References: <20180223173655.GB24390@jasmine.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epI3T-0002bx-1Q for help-guix@gnu.org; Fri, 23 Feb 2018 13:26:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epI3S-0003IR-3N for help-guix@gnu.org; Fri, 23 Feb 2018 13:26:47 -0500 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:45358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1epI3R-0003Hz-Sk for help-guix@gnu.org; Fri, 23 Feb 2018 13:26:46 -0500 Received: by mail-wr0-x230.google.com with SMTP id p104so15010297wrc.12 for ; Fri, 23 Feb 2018 10:26:45 -0800 (PST) In-Reply-To: <20180223173655.GB24390@jasmine.lan> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Leo Famulari Cc: help-guix@gnu.org Hi, Thank you for the explanations. All the best, simon On 23 February 2018 at 18:36, Leo Famulari wrote: > On Fri, Feb 23, 2018 at 06:27:30PM +0100, zimoun wrote: >> I am asking if this behaviour is expected or if I miss something. >> >> The command: >> >> guix package -i python >> >> installs the python3 version and there is no python in .guix-profile/bin/. >> >> And in another profile `guix package -i python@2' installs the python2 >> and there is python in profile/bin/. >> >> >> To me, it is counter-intuitive. What is the reason ? >> And there is not any, since python 2 is dying, I suggest that python >> points to python3 and not python2. > > The recommendation by the CPython team, expressed in their build > scripts, is to install Python 3 as `python3`, and we try to follow > upstream as closely as we can. I'd guess their reason is long-term > compatibility with existing Python software that assumes `python` is > Python 2. > > We offer Python 3 as `python` in the special package python-wrapper. > > In general, Guix does default to Python 3. If you want to use Python 2 > in a package or profile, you have to specify it. Otherwise, using the > package named 'python' will give you Python 3. If there are several > versions of a Guix package with the same name, Guix uses the latest > version by default.