guix-devel
[Top][All Lists]
Advanced

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

Re: installing python 2 and python 3 in the same profile


From: Pjotr Prins
Subject: Re: installing python 2 and python 3 in the same profile
Date: Sat, 10 Mar 2018 09:34:21 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 address@hidden 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. During a
course we gave this week we saw multiple occurances of students
messing up with python versions inside notebooks(!) That is how bad it
gets. I think the Python community rather screwed up on that one. That
is why people use virtualenv which is a full copy of a Python setup.

> It still works with ad-hoc environments, but manifests containing both
> Python versions cannot be instantiated any more.  This is too strict,
> because we know that these two variants don’t cause conflicts.

That is not my experience. Any mix is a problem.

> What can we do to make this feature a little smarter?
> 
> How about a package property that defines a “conflicts?” predicate that
> takes two packages of the same name and determines (e.g. by checking the
> major version) if these two packages are conflicting?  If no such
> predicate is provided we assume that packages with the same name cause a
> conflict and prevent installation.

I suggest not to go there. Teach people about profiles and
environments and all should be fine. You can support Python 3, Python
2.7 and Python 2.4 (etc), but it is better not to put them in one
profile. A profile represents a sane environment. That is how it
should be. 

I must add that in most of my Guix experience I relied on
$HOME/.guix-profile. But these days I hardly use that anymore. Just
for some basic desktop tooling. Using multiple profiles is the only
way to mix versions and keep a level of sanity.

Pj.
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]