From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: installing python 2 and python 3 in the same profile Date: Sun, 11 Mar 2018 13:42:39 +0100 Message-ID: <20180311124239.GA811@thebird.nl> References: <87y3j4l3xj.fsf@mdc-berlin.de> <20180310083421.GA26219@thebird.nl> <87ina2uaum.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ev0NM-0005TR-Kv for guix-devel@gnu.org; Sun, 11 Mar 2018 08:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ev0NJ-0007Fu-J5 for guix-devel@gnu.org; Sun, 11 Mar 2018 08:46:56 -0400 Received: from mail.thebird.nl ([95.154.246.10]:41289) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ev0NJ-0007ES-CU for guix-devel@gnu.org; Sun, 11 Mar 2018 08:46:53 -0400 Content-Disposition: inline In-Reply-To: <87ina2uaum.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: Guix-devel , Ricardo Wurmus On Sun, Mar 11, 2018 at 12:10:09PM +0100, Ricardo Wurmus wrote: > Obviously, I strongly disagree :) =20 You should ;) > On my CentOS and Fedora machines at work both versions are installed > (with the system package manager) and nobody complains. I can conjure > up a Python 2 environment by calling =E2=80=9Cpython2=E2=80=9D and a Py= thon 3 > environment by calling =E2=80=9Cpython3=E2=80=9D or =E2=80=9Cpython=E2=80= =9D. Neither variant will load > up modules for the other variant =E2=80=94 unlike the behaviour on Guix= . >=20 > Even in Guix we allow these packages to be added to the same environmen= t > with =E2=80=9Cguix environment --ad-hoc=E2=80=9D =E2=80=93 and there ar= e no collisions, because > upstream made the effort to ensure that these packages don=E2=80=99t pr= ovide > files of the same names. >=20 > It is an unnecessary restriction to *prevent* users from installing > Python 2 and 3 interpreters into the same profile. Any errors we see > with mixing 2 and 3 is due to a bug in Guix which is due to our use of > PYTHONPATH. Alright, if you choose to use them as two different tools/languages. But even in minor versions there are problems. Ruby has those too, I know for a fact, though Python may be worse since it uses compiled sources. > In large environments Python 2 and 3 modules and interpreters can > peacefully coexist as long as the tools use the appropriate names for > the interpreters (=E2=80=9Cpython2=E2=80=9D or =E2=80=9Cpython=E2=80=9D= for Python 2, =E2=80=9Cpython3=E2=80=9D for > the interpreter for Python 3). >=20 > In other places in Guix we don=E2=80=99t even prevent users from doing = things > that are generally ill-advised (e.g. the use of LD_LIBRARY_PATH); why > would we prevent a perfectly valid use-case when it comes to different > versions of Python? Sure. Note that Python2 is quickly becoming obsolete. It is escalating because packages are now dropping support. After 10 years of joy mixing versions... Pj.