unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Pjotr Prins <pjotr.public12@thebird.nl>
Cc: Guix-devel <guix-devel@gnu.org>,
	Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Subject: Re: installing python 2 and python 3 in the same profile
Date: Sun, 11 Mar 2018 12:10:09 +0100	[thread overview]
Message-ID: <87ina2uaum.fsf@elephly.net> (raw)
In-Reply-To: <20180310083421.GA26219@thebird.nl>


Pjotr Prins <pjotr.public12@thebird.nl> writes:

> On Wed, Mar 07, 2018 at 08:50:48AM +0100, Ricardo Wurmus wrote:
>> Hi Guix,
>>
>> with the introduction of the collision avoidance feature that prevents
>> you from installing different variants of the same package into a
>> profile we made it impossible to install “python” and “python@2” into
>> the same profile.
>
> I am happy with this idea. Maybe guix can give an informative message
> in the case of Python.
>
> Generally, mixing Python2 and 3 in one profile makes no sense.

Obviously, I strongly disagree :)

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 “python2” and a Python 3
environment by calling “python3” or “python”.  Neither variant will load
up modules for the other variant — unlike the behaviour on Guix.

Even in Guix we allow these packages to be added to the same environment
with “guix environment --ad-hoc” – and there are no collisions, because
upstream made the effort to ensure that these packages don’t provide
files of the same names.

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.

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 (“python2” or “python” for Python 2, “python3” for
the interpreter for Python 3).

In other places in Guix we don’t 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?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  parent reply	other threads:[~2018-03-11 11:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  7:50 installing python 2 and python 3 in the same profile Ricardo Wurmus
2018-03-10  8:34 ` Pjotr Prins
2018-03-11  9:11   ` Konrad Hinsen
2018-03-11 11:10   ` Ricardo Wurmus [this message]
2018-03-11 12:42     ` Pjotr Prins
2018-03-11 13:30       ` Hartmut Goebel
2018-03-11 13:36         ` Pjotr Prins
2018-03-12  7:07     ` Konrad Hinsen
2018-03-12  8:37       ` Ricardo Wurmus
2018-03-11 13:00   ` Hartmut Goebel
2018-03-11 13:27     ` Pjotr Prins
2018-03-13 21:52 ` Ludovic Courtès
2018-03-14  8:40   ` Ricardo Wurmus
2018-03-14 11:39   ` Hartmut Goebel
2018-03-14 14:30     ` Konrad Hinsen
2018-03-15  9:11       ` Ludovic Courtès
2018-03-15  9:37         ` Konrad Hinsen
2018-03-16 20:59         ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ina2uaum.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).