GNU bug report logs - #42920
conda 4.8.3 on guix cannot activate environments

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Hugo Buddelmeijer <hugo@HIDDEN>; dated Tue, 18 Aug 2020 19:25:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 42920 <at> debbugs.gnu.org:


Received: (at 42920) by debbugs.gnu.org; 25 Aug 2020 15:03:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 25 11:03:46 2020
Received: from localhost ([127.0.0.1]:35671 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kAaUD-0004yc-Up
	for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 11:03:46 -0400
Received: from mail-pg1-f175.google.com ([209.85.215.175]:34937)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1kAaUB-0004yO-AI
 for 42920 <at> debbugs.gnu.org; Tue, 25 Aug 2020 11:03:44 -0400
Received: by mail-pg1-f175.google.com with SMTP id o5so7014386pgb.2
 for <42920 <at> debbugs.gnu.org>; Tue, 25 Aug 2020 08:03:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=vuwKIn4ZqJeHp9eSZqKpTP6VpMWffT/cwvHfdtrnixk=;
 b=gxwXAwPcZD/8OV12/GYpWppWG9KnrACxLJ5Yl8TbfI1YV7jMyFhEiNQpT3AUsJHOmY
 IzzxClzppSV3nNUX/TChLoJ1JBkDtViPw5Ta09DhEQSbc0Tu8C8O8Vdas6ro5b3xcwF0
 tJI3QwQNoIBJQQ/wegVQz3HDMX8UiTQR9XERS0TXbq4ajYhloR7QpNJ3+SG8LDXQEipg
 l7njygVk361HkCihu3c5h/4MjLbJpOGONRcLgd8y3FoFgbVsXxT4CipqqtQCjZTLYo43
 +iFZ7nH9hHWw3mAhqiA+1tPGmVhYLYzYf1//vfeFetJZmXapduABFi890b/wLkxg2seR
 /EAQ==
X-Gm-Message-State: AOAM530+SwTsi4l0yHL1jqEKGleUpvBkDLvGqNFSDOcbC9duHcCLR6mL
 aWQTDP8Z1qS4ZmEPv9DPtlxAb+IrtkHX0PSkRa8=
X-Google-Smtp-Source: ABdhPJwJevNLB+oYhXtd2ULd+UH5FKiGS/oc+AB36XsW287DmTXKj8UzsJ1+fZ/rW/oK8ADNSbwGUEdUmslnqq/DbGA=
X-Received: by 2002:a17:902:eec4:: with SMTP id
 h4mr2976110plb.241.1598367817354; 
 Tue, 25 Aug 2020 08:03:37 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
 <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
 <87imd6x5to.fsf@HIDDEN>
In-Reply-To: <87imd6x5to.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Tue, 25 Aug 2020 17:03:26 +0200
Message-ID: <CA+Jv8O1uj5XrWk6PnO4UCwjBPxmfV+4QM_+uosP71POG6vkyTg@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000f952be05adb5015a"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 42920
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--000000000000f952be05adb5015a
Content-Type: text/plain; charset="UTF-8"

Hi Ricardo,

On Tue, 25 Aug 2020 at 14:35, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> > The problem with the prompt arises from step 4), because 'conda' has bash
> > as interpreter, and "non-interactive bashes go out of their way to unset
> > PS1":
> >
> https://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-variable-ps1
> > https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html
>
> Good sleuthing!
>
> > So .conda.real never gets the PS1 variable and it disappears.


I did some more experiments, and forcing the wrapper script to start in
interactive mode solves the problem.

`conda init` adds some things to `.bashrc`, in particular it `eval`s the
output from `conda shell.bash hook`, which creates the `conda` bash
function (and associated functions).

The output from `conda shell.bash hook` seems to be based on
`/etc/profile.d/conda.sh`:
https://github.com/conda/conda/blob/master/conda/shell/etc/profile.d/conda.sh
As in, it prefixes some environment variables and appends the activation of
the base environment.

Now if we replace all 5 occurances of
"$CONDA_EXE" $_CE_M $_CE_CONDA
in that file with
bash --norc -i "$CONDA_EXE" $_CE_M $_CE_CONDA
then everything works as expected.

The -i is to enable interactive mode, preventing PS1 from being eaten.
--norc is necessary to not source .bashrc.
There are two occurences of "$CONDA_EXE" that should not be replaced, hence
adding the CE variables.

Would editing files like that be possible in a guix package script?

It seems that it is only a simple sed replace on a single file. It is a bit
hackish, because it adds knowledge to the package that a) there is a
wrapper script and b) it is in bash.

I have only experimented with it by copying the output off `conda
shell.bash hook` to a file in my home directory and editing that. Maybe I
can try to update the package too.

Other options:
- Use some other sh than bash, one that does not eat PS1, (e.g. dash) as
wrapper script. I just verified that *all* wrappers on my machine are bash.
However, some are using bash-minimal, so that means that there is a choice,
so maybe switching shells is possible?
- Somehow let conda work with another variable than PS1. Seems more
complicated.

Then what is left is updating `conda init` such that
- it doesn't complain when it cannot edit files
- it only uses paths in ~/.guix-profile
but this is not essential to get conda to work.

Cheers,
Hugo

--000000000000f952be05adb5015a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Ricardo,<br></div><br><div><div dir=3D"ltr" class=
=3D"gmail_attr">On Tue, 25 Aug 2020 at 14:35, Ricardo Wurmus &lt;<a href=3D=
"mailto:rekado@HIDDEN">rekado@HIDDEN</a>&gt; wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; The problem with the prompt arises from step 4), because &#39;conda&#3=
9; has bash<br>
&gt; as interpreter, and &quot;non-interactive bashes go out of their way t=
o unset<br>
&gt; PS1&quot;:<br>
&gt; <a href=3D"https://superuser.com/questions/663069/why-does-subshell-no=
t-inherit-exported-variable-ps1" rel=3D"noreferrer" target=3D"_blank">https=
://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-va=
riable-ps1</a><br>
&gt; <a href=3D"https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html" rel=3D=
"noreferrer" target=3D"_blank">https://tldp.org/HOWTO/Bash-Prompt-HOWTO/set=
ps.html</a><br>
<br>
Good sleuthing!<br>
<br>
&gt; So .conda.real never gets the PS1 variable and it disappears.</blockqu=
ote><div><br></div><div>I did some more experiments, and forcing the wrappe=
r script to start in interactive mode solves the problem.</div><div><br></d=
iv>`conda init` adds some things to `.bashrc`, in particular it `eval`s the=
 output from `conda shell.bash hook`, which creates the `conda` bash functi=
on (and associated functions).</div><div><br></div><div>The output from `co=
nda shell.bash hook` seems to be based on `/etc/profile.d/conda.sh`:<br></d=
iv><div><a href=3D"https://github.com/conda/conda/blob/master/conda/shell/e=
tc/profile.d/conda.sh">https://github.com/conda/conda/blob/master/conda/she=
ll/etc/profile.d/conda.sh</a></div><div>As in, it prefixes some environment=
 variables and appends the activation of the base environment.</div><div><b=
r></div><div>Now if we replace all 5 occurances of</div><div>&quot;$CONDA_E=
XE&quot; $_CE_M $_CE_CONDA</div><div>in that file with</div><div>bash --nor=
c -i &quot;$CONDA_EXE&quot; $_CE_M $_CE_CONDA</div><div>then everything wor=
ks as expected.</div><div><br></div><div>The -i is to enable interactive mo=
de, preventing PS1 from being eaten. --norc is necessary to not source .bas=
hrc.<br></div><div>There are two occurences of &quot;$CONDA_EXE&quot; that =
should not be replaced, hence adding the CE variables.</div><div><br></div>=
<div>Would editing files like that be possible in a guix package script?</d=
iv><div><br></div><div><div>It seems that it is only a simple sed replace o=
n a single file. It is a bit hackish, because it adds knowledge to the pack=
age that a) there is a wrapper script and b) it is in bash.</div></div><div=
><br></div><div>I have only experimented with it by copying the output off =
`conda shell.bash hook` to a file in my home directory and editing that. Ma=
ybe I can try to update the package too.<br></div><div><br></div><div>Other=
 options:</div><div>- Use some other sh than bash, one that does not eat PS=
1, (e.g. dash) as wrapper script. I just verified that *all* wrappers on my=
 machine are bash. However, some are using bash-minimal, so that means that=
 there is a choice, so maybe switching shells is possible?</div><div>- Some=
how let conda work with another variable than PS1. Seems more complicated.<=
/div><div><br></div><div>Then what is left is updating `conda init` such th=
at</div><div>- it doesn&#39;t complain when it cannot edit files</div><div>=
- it only uses paths in ~/.guix-profile</div><div>but this is not essential=
 to get conda to work.<br></div><div><br></div><div>Cheers,</div><div>Hugo<=
/div><div><br></div></div>

--000000000000f952be05adb5015a--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Aug 2020 15:03:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 25 11:03:58 2020
Received: from localhost ([127.0.0.1]:35674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kAaUQ-0004z6-D2
	for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 11:03:58 -0400
Received: from lists.gnu.org ([209.51.188.17]:52386)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1kAaUO-0004yx-0J
 for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 11:03:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54210)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1kAaUN-0007AO-QY
 for bug-guix@HIDDEN; Tue, 25 Aug 2020 11:03:55 -0400
Received: from mail-pg1-f179.google.com ([209.85.215.179]:34526)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1kAaU7-0002mt-Mp
 for bug-guix@HIDDEN; Tue, 25 Aug 2020 11:03:55 -0400
Received: by mail-pg1-f179.google.com with SMTP id i10so7019958pgk.1
 for <bug-guix@HIDDEN>; Tue, 25 Aug 2020 08:03:38 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=vuwKIn4ZqJeHp9eSZqKpTP6VpMWffT/cwvHfdtrnixk=;
 b=N/IBRpJ27/pNmdTvCPLgr8MchSrC7X1dLQWQziEGa4jV72vlDo9bMOHLgyZDyTvcAy
 UByvngxlrbzNxZz5IPhvZZaKGlFQXzBHNA8t5dNvqaQAxSKzNiy95+Qyq9E7kN2fsXaQ
 ufHZnDZxbsOglXoQchWucTigAk6wv2r126hGcppAzr3eEsfcGrhiue9P51zlnoo7hTmf
 0tO4i8BgK5NbAmaYQl2fTMEWsUDc8VlMhYph9eZHqA8grDqJL+3cf6Mdz+w3hIiK6EYY
 liH/7wffeDhRz/zozknJHD0++QKL5QaU7SoAU1sRWEWzkVyFRNuCbqrkLuwlC/QfNTgW
 43zA==
X-Gm-Message-State: AOAM531hR9XptXSupdbILs1SDgF+EWhO5DkE9GYzY26Lqv47/HZ1U6it
 CRR7SuuVSxz4yJRZwn1rkoimnFOGqwoSh2ANW1hQEmkrv4pV7w==
X-Google-Smtp-Source: ABdhPJwJevNLB+oYhXtd2ULd+UH5FKiGS/oc+AB36XsW287DmTXKj8UzsJ1+fZ/rW/oK8ADNSbwGUEdUmslnqq/DbGA=
X-Received: by 2002:a17:902:eec4:: with SMTP id
 h4mr2976110plb.241.1598367817354; 
 Tue, 25 Aug 2020 08:03:37 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
 <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
 <87imd6x5to.fsf@HIDDEN>
In-Reply-To: <87imd6x5to.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Tue, 25 Aug 2020 17:03:26 +0200
Message-ID: <CA+Jv8O1uj5XrWk6PnO4UCwjBPxmfV+4QM_+uosP71POG6vkyTg@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000f952be05adb5015a"
Received-SPF: pass client-ip=209.85.215.179; envelope-from=blackshift@HIDDEN;
 helo=mail-pg1-f179.google.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/25 11:03:37
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -13
X-Spam_score: -1.4
X-Spam_bar: -
X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9,
 FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

--000000000000f952be05adb5015a
Content-Type: text/plain; charset="UTF-8"

Hi Ricardo,

On Tue, 25 Aug 2020 at 14:35, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> > The problem with the prompt arises from step 4), because 'conda' has bash
> > as interpreter, and "non-interactive bashes go out of their way to unset
> > PS1":
> >
> https://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-variable-ps1
> > https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html
>
> Good sleuthing!
>
> > So .conda.real never gets the PS1 variable and it disappears.


I did some more experiments, and forcing the wrapper script to start in
interactive mode solves the problem.

`conda init` adds some things to `.bashrc`, in particular it `eval`s the
output from `conda shell.bash hook`, which creates the `conda` bash
function (and associated functions).

The output from `conda shell.bash hook` seems to be based on
`/etc/profile.d/conda.sh`:
https://github.com/conda/conda/blob/master/conda/shell/etc/profile.d/conda.sh
As in, it prefixes some environment variables and appends the activation of
the base environment.

Now if we replace all 5 occurances of
"$CONDA_EXE" $_CE_M $_CE_CONDA
in that file with
bash --norc -i "$CONDA_EXE" $_CE_M $_CE_CONDA
then everything works as expected.

The -i is to enable interactive mode, preventing PS1 from being eaten.
--norc is necessary to not source .bashrc.
There are two occurences of "$CONDA_EXE" that should not be replaced, hence
adding the CE variables.

Would editing files like that be possible in a guix package script?

It seems that it is only a simple sed replace on a single file. It is a bit
hackish, because it adds knowledge to the package that a) there is a
wrapper script and b) it is in bash.

I have only experimented with it by copying the output off `conda
shell.bash hook` to a file in my home directory and editing that. Maybe I
can try to update the package too.

Other options:
- Use some other sh than bash, one that does not eat PS1, (e.g. dash) as
wrapper script. I just verified that *all* wrappers on my machine are bash.
However, some are using bash-minimal, so that means that there is a choice,
so maybe switching shells is possible?
- Somehow let conda work with another variable than PS1. Seems more
complicated.

Then what is left is updating `conda init` such that
- it doesn't complain when it cannot edit files
- it only uses paths in ~/.guix-profile
but this is not essential to get conda to work.

Cheers,
Hugo

--000000000000f952be05adb5015a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Ricardo,<br></div><br><div><div dir=3D"ltr" class=
=3D"gmail_attr">On Tue, 25 Aug 2020 at 14:35, Ricardo Wurmus &lt;<a href=3D=
"mailto:rekado@HIDDEN">rekado@HIDDEN</a>&gt; wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; The problem with the prompt arises from step 4), because &#39;conda&#3=
9; has bash<br>
&gt; as interpreter, and &quot;non-interactive bashes go out of their way t=
o unset<br>
&gt; PS1&quot;:<br>
&gt; <a href=3D"https://superuser.com/questions/663069/why-does-subshell-no=
t-inherit-exported-variable-ps1" rel=3D"noreferrer" target=3D"_blank">https=
://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-va=
riable-ps1</a><br>
&gt; <a href=3D"https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html" rel=3D=
"noreferrer" target=3D"_blank">https://tldp.org/HOWTO/Bash-Prompt-HOWTO/set=
ps.html</a><br>
<br>
Good sleuthing!<br>
<br>
&gt; So .conda.real never gets the PS1 variable and it disappears.</blockqu=
ote><div><br></div><div>I did some more experiments, and forcing the wrappe=
r script to start in interactive mode solves the problem.</div><div><br></d=
iv>`conda init` adds some things to `.bashrc`, in particular it `eval`s the=
 output from `conda shell.bash hook`, which creates the `conda` bash functi=
on (and associated functions).</div><div><br></div><div>The output from `co=
nda shell.bash hook` seems to be based on `/etc/profile.d/conda.sh`:<br></d=
iv><div><a href=3D"https://github.com/conda/conda/blob/master/conda/shell/e=
tc/profile.d/conda.sh">https://github.com/conda/conda/blob/master/conda/she=
ll/etc/profile.d/conda.sh</a></div><div>As in, it prefixes some environment=
 variables and appends the activation of the base environment.</div><div><b=
r></div><div>Now if we replace all 5 occurances of</div><div>&quot;$CONDA_E=
XE&quot; $_CE_M $_CE_CONDA</div><div>in that file with</div><div>bash --nor=
c -i &quot;$CONDA_EXE&quot; $_CE_M $_CE_CONDA</div><div>then everything wor=
ks as expected.</div><div><br></div><div>The -i is to enable interactive mo=
de, preventing PS1 from being eaten. --norc is necessary to not source .bas=
hrc.<br></div><div>There are two occurences of &quot;$CONDA_EXE&quot; that =
should not be replaced, hence adding the CE variables.</div><div><br></div>=
<div>Would editing files like that be possible in a guix package script?</d=
iv><div><br></div><div><div>It seems that it is only a simple sed replace o=
n a single file. It is a bit hackish, because it adds knowledge to the pack=
age that a) there is a wrapper script and b) it is in bash.</div></div><div=
><br></div><div>I have only experimented with it by copying the output off =
`conda shell.bash hook` to a file in my home directory and editing that. Ma=
ybe I can try to update the package too.<br></div><div><br></div><div>Other=
 options:</div><div>- Use some other sh than bash, one that does not eat PS=
1, (e.g. dash) as wrapper script. I just verified that *all* wrappers on my=
 machine are bash. However, some are using bash-minimal, so that means that=
 there is a choice, so maybe switching shells is possible?</div><div>- Some=
how let conda work with another variable than PS1. Seems more complicated.<=
/div><div><br></div><div>Then what is left is updating `conda init` such th=
at</div><div>- it doesn&#39;t complain when it cannot edit files</div><div>=
- it only uses paths in ~/.guix-profile</div><div>but this is not essential=
 to get conda to work.<br></div><div><br></div><div>Cheers,</div><div>Hugo<=
/div><div><br></div></div>

--000000000000f952be05adb5015a--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at 42920 <at> debbugs.gnu.org:


Received: (at 42920) by debbugs.gnu.org; 25 Aug 2020 12:34:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 25 08:34:28 2020
Received: from localhost ([127.0.0.1]:60642 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kAY9j-0001d1-QT
	for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 08:34:28 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1kAY9h-0001cm-Ta
 for 42920 <at> debbugs.gnu.org; Tue, 25 Aug 2020 08:34:26 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1598358858; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=UaTiRjw764EIs1SQV4kL4uSwOOA+tixbvdzcJPk8OEWwyymHW1DSqCietxtiS/7Ex5iX2uQf5n/Frwebd1J0QKkya1msIyO9HR6IxYVBrM88IfWFAufSKKFkYcNEJHJTVowlfqye/0t2qhxs+OEkiLkYJMCxRwySKaLMTYrp6/E=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1598358858;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=jv7a5d8OB+bLMi58WLlJZ5WC8HZq5AiNKSNsAfU/rdQ=; 
 b=ldaK/9lEVSiO2eqVAYzna7cTUmJo8XslTOsVSftfG6ONhUvlIENCvM6f5P0gTrhSKb/1VqxgC21OJquoIl4LzWyDsiNqHmOWT3PeeWZOEG7KNHuoaFCJLxSwkPXrRY5V24b1nY03JQO1SLnn50E9TbCyvxxPOiT+EN890ANzDow=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1598358858; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=jv7a5d8OB+bLMi58WLlJZ5WC8HZq5AiNKSNsAfU/rdQ=;
 b=Y14Lk5Go0qkLBTu1zNPQAI5QQaVuDuDYvd4HXk+AtKOYLNBueqTA943BlrLn4rp9
 EgauJ9yqbYzwYo2afx1ebqnsFa1T/e+HYemsJN15vC0Y9cRSZcfk326gc3YphI5yr9D
 9sCUFnVm8fxKLJkVWXrNo/mWDituTJAi3NhQKkUM=
Received: from localhost (p54ad4c14.dip0.t-ipconnect.de [84.173.76.20]) by
 mx.zohomail.com with SMTPS id 1598358854650721.6492113191758;
 Tue, 25 Aug 2020 05:34:14 -0700 (PDT)
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
 <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
User-agent: mu4e 1.4.10; emacs 26.3
From: Ricardo Wurmus <rekado@HIDDEN>
To: Hugo Buddelmeijer <hugo@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
In-reply-to: <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 25 Aug 2020 14:34:11 +0200
Message-ID: <87imd6x5to.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 42920
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hi Hugo,

> The problem with the prompt arises from step 4), because 'conda' has bash
> as interpreter, and "non-interactive bashes go out of their way to unset
> PS1":
> https://superuser.com/questions/663069/why-does-subshell-not-inherit-expo=
rted-variable-ps1
> https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

Good sleuthing!

> So .conda.real never gets the PS1 variable and it disappears.
>
> I don't really understand why there is a bash function, a conda bash scri=
pt
> and a .conda-real python script.

That=E2=80=99s because we wrap application to ensure that they run with exp=
ected
environment variables.  By default this wrapper is implemented as a Bash
script, but we also have =E2=80=9Cwrap-script=E2=80=9D, which turns scripts=
 using =E2=80=9C#=E2=80=9D as
a comment character into polyglottal Guile scripts, setting variables
with Guile and then reexecuting themselves with the actual interpreter.

Not sure if that would help here.

(There also have been reports about =E2=80=9Cwrap-script=E2=80=9D being bug=
gy, but I
don=E2=80=99t recall any details.)

--=20
Ricardo




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Aug 2020 12:34:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 25 08:34:27 2020
Received: from localhost ([127.0.0.1]:60640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kAY9j-0001cz-Ia
	for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 08:34:27 -0400
Received: from lists.gnu.org ([209.51.188.17]:42210)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1kAY9h-0001cl-Dm
 for submit <at> debbugs.gnu.org; Tue, 25 Aug 2020 08:34:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34658)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1kAY9h-0005oS-6Y
 for bug-guix@HIDDEN; Tue, 25 Aug 2020 08:34:25 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21188)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1kAY9d-0006bB-Rx
 for bug-guix@HIDDEN; Tue, 25 Aug 2020 08:34:24 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1598358858; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=UaTiRjw764EIs1SQV4kL4uSwOOA+tixbvdzcJPk8OEWwyymHW1DSqCietxtiS/7Ex5iX2uQf5n/Frwebd1J0QKkya1msIyO9HR6IxYVBrM88IfWFAufSKKFkYcNEJHJTVowlfqye/0t2qhxs+OEkiLkYJMCxRwySKaLMTYrp6/E=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1598358858;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=jv7a5d8OB+bLMi58WLlJZ5WC8HZq5AiNKSNsAfU/rdQ=; 
 b=ldaK/9lEVSiO2eqVAYzna7cTUmJo8XslTOsVSftfG6ONhUvlIENCvM6f5P0gTrhSKb/1VqxgC21OJquoIl4LzWyDsiNqHmOWT3PeeWZOEG7KNHuoaFCJLxSwkPXrRY5V24b1nY03JQO1SLnn50E9TbCyvxxPOiT+EN890ANzDow=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1598358858; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=jv7a5d8OB+bLMi58WLlJZ5WC8HZq5AiNKSNsAfU/rdQ=;
 b=Y14Lk5Go0qkLBTu1zNPQAI5QQaVuDuDYvd4HXk+AtKOYLNBueqTA943BlrLn4rp9
 EgauJ9yqbYzwYo2afx1ebqnsFa1T/e+HYemsJN15vC0Y9cRSZcfk326gc3YphI5yr9D
 9sCUFnVm8fxKLJkVWXrNo/mWDituTJAi3NhQKkUM=
Received: from localhost (p54ad4c14.dip0.t-ipconnect.de [84.173.76.20]) by
 mx.zohomail.com with SMTPS id 1598358854650721.6492113191758;
 Tue, 25 Aug 2020 05:34:14 -0700 (PDT)
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
 <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
User-agent: mu4e 1.4.10; emacs 26.3
From: Ricardo Wurmus <rekado@HIDDEN>
To: Hugo Buddelmeijer <hugo@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
In-reply-to: <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 25 Aug 2020 14:34:11 +0200
Message-ID: <87imd6x5to.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@HIDDEN;
 helo=sender4-of-o51.zoho.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/25 08:34:19
X-ACL-Warn: Detected OS   = Linux 3.11 and newer [fuzzy]
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Hi Hugo,

> The problem with the prompt arises from step 4), because 'conda' has bash
> as interpreter, and "non-interactive bashes go out of their way to unset
> PS1":
> https://superuser.com/questions/663069/why-does-subshell-not-inherit-expo=
rted-variable-ps1
> https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

Good sleuthing!

> So .conda.real never gets the PS1 variable and it disappears.
>
> I don't really understand why there is a bash function, a conda bash scri=
pt
> and a .conda-real python script.

That=E2=80=99s because we wrap application to ensure that they run with exp=
ected
environment variables.  By default this wrapper is implemented as a Bash
script, but we also have =E2=80=9Cwrap-script=E2=80=9D, which turns scripts=
 using =E2=80=9C#=E2=80=9D as
a comment character into polyglottal Guile scripts, setting variables
with Guile and then reexecuting themselves with the actual interpreter.

Not sure if that would help here.

(There also have been reports about =E2=80=9Cwrap-script=E2=80=9D being bug=
gy, but I
don=E2=80=99t recall any details.)

--=20
Ricardo




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at 42920 <at> debbugs.gnu.org:


Received: (at 42920) by debbugs.gnu.org; 23 Aug 2020 19:26:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 23 15:26:58 2020
Received: from localhost ([127.0.0.1]:55154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k9vdq-0005AE-4i
	for submit <at> debbugs.gnu.org; Sun, 23 Aug 2020 15:26:58 -0400
Received: from mail-pj1-f48.google.com ([209.85.216.48]:40906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1k9vdo-00059s-8Q
 for 42920 <at> debbugs.gnu.org; Sun, 23 Aug 2020 15:26:56 -0400
Received: by mail-pj1-f48.google.com with SMTP id d4so3053982pjx.5
 for <42920 <at> debbugs.gnu.org>; Sun, 23 Aug 2020 12:26:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=sJUq2M0TUo575Kc0WiPrzMKym4LaG3lqNqxH6LmdSY8=;
 b=czjDMEiRruPrT09TRsmlG2Sqwaj2B9K2UUFZvxxk9jG53DjE/xfBsyuf+DLkWrZyWV
 CBeFSqqgtMYpWMml/BLq0212zXOoeRInY4vf67/pe1n7CEpvvCBoThR6eS+7BAPbE2Eq
 hjiJshktHu7uGKYH3dgeYTvITCNG7X22RBZJHa3J7tx47lap98LCYgzbo4AdIfHPf3dI
 RQlqodFpVILPtU6BqbZJ4Ofb9Nj6m3+nbtrNhPxy1R10gC5eQxETjFyOZlPx2VtETnX4
 c0pOWQfYCgyBGGxxdvHoqh+y7h8Nfo7pvCEgQ/qyu4KvJLdbZRz1U6oGF69rR2LDsb8b
 aLfA==
X-Gm-Message-State: AOAM531y2tiGOYNXPLEatkkGXep1qvJKEztfjAUpvArFTI+YNOuP3Cp9
 W1lLUwe3vkhg8pjKC3ZSy1COCjP/arWyKWLhM7A=
X-Google-Smtp-Source: ABdhPJz3tz4XJRo+zXjqUyBDn83Gisp0RbQ+UEvDOPhiahNorN1QBUNvKisdEUOV9nyVWKxyYT/aTyelp+priL1nAKI=
X-Received: by 2002:a17:902:523:: with SMTP id
 32mr1532046plf.176.1598210810265; 
 Sun, 23 Aug 2020 12:26:50 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
In-Reply-To: <87364gy7tw.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Sun, 23 Aug 2020 21:26:39 +0200
Message-ID: <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000009f441605ad907366"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 42920
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--0000000000009f441605ad907366
Content-Type: text/plain; charset="UTF-8"

Just sharing a bit of more info about why the conda prompt breaks.

On Fri, 21 Aug 2020 at 05:52, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> Hugo Buddelmeijer <hugo@HIDDEN> writes:
>
> > 2. The prompt is not set correctly, as in, what should happen is that the
> > current conda environment is added to the prompt. Instead, the prompt is
> > replaced entirely by the environment. This shouldn't be too hard to fix
> > manually though.
>
> Weird!  Is this something Conda does wrong because it assumes too much
> about the existing prompt?
>

This is what happens, reducing the files to the essence:

1) .bashrc runs

__conda_setup="$('/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda'
'shell.bash' 'hook' 2> /dev/null)"
eval "$__conda_setup"

2) __conda_setup runs

__conda_activate() {
    ask_conda="$(PS1="$PS1" "$CONDA_EXE" $_CE_M $_CE_CONDA shell.posix
"$cmd" "$@")" || \return $?
    \eval "$ask_conda"
}
conda activate base

3) ask_conda will contain the new PS1 definition. The command ran to create
ask_conda  is

PS1="\u@\h \w\$"
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda"
shell.posix "activate" "base"

4) conda runs

#!/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
export PYTHONPATH="/gnu/store....."
exec -a "$0"
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.conda-real"
"$@"

5) .conda.real generates the prompt in Python:

from conda.cli import main
sys.exit(main())

6) .conda.real outputs
PS1='(base) '
export PATH='...

The problem with the prompt arises from step 4), because 'conda' has bash
as interpreter, and "non-interactive bashes go out of their way to unset
PS1":
https://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-variable-ps1
https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

So .conda.real never gets the PS1 variable and it disappears.

I don't really understand why there is a bash function, a conda bash script
and a .conda-real python script.

My local miniconda 4.8.3 installation on an Ubuntu machine (in my home
directory) does not have a ".conda-real": "conda" directly is the Python
script, so everything works.

Maybe more later.

Hugo



> --
> Ricardo
>

--0000000000009f441605ad907366
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Just sharing a bit of more info about why the conda p=
rompt breaks.</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Fri, 21 Aug 2020 at 05:52, Ricardo Wurmus &lt;<a href=3D"ma=
ilto:rekado@HIDDEN">rekado@HIDDEN</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex"><br>
Hugo Buddelmeijer &lt;<a href=3D"mailto:hugo@HIDDEN" target=3D"_bl=
ank">hugo@HIDDEN</a>&gt; writes:<br>
<br>
&gt; 2. The prompt is not set correctly, as in, what should happen is that =
the<br>
&gt; current conda environment is added to the prompt. Instead, the prompt =
is<br>
&gt; replaced entirely by the environment. This shouldn&#39;t be too hard t=
o fix<br>
&gt; manually though.<br>
<br>
Weird!=C2=A0 Is this something Conda does wrong because it assumes too much=
<br>
about the existing prompt?<br></blockquote><div><br></div><div>This is what=
 happens, reducing the files to the essence:</div><div><br></div><div>1) .b=
ashrc runs<br></div><div><br></div><div>__conda_setup=3D&quot;$(&#39;/gnu/s=
tore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda&#39; &#39;shell=
.bash&#39; &#39;hook&#39; 2&gt; /dev/null)&quot;<br>eval &quot;$__conda_set=
up&quot;<br></div><div><br></div><div>2) __conda_setup runs<br></div><div><=
br></div><div>__conda_activate() {<br>=C2=A0 =C2=A0 ask_conda=3D&quot;$(PS1=
=3D&quot;$PS1&quot; &quot;$CONDA_EXE&quot; $_CE_M $_CE_CONDA shell.posix &q=
uot;$cmd&quot; &quot;$@&quot;)&quot; || \return $?<br>	=C2=A0 =C2=A0 \eval =
&quot;$ask_conda&quot;<br>}<br></div><div>conda activate base<br></div><div=
><br></div><div>3) ask_conda will contain the new PS1 definition. The comma=
nd ran to create ask_conda=C2=A0 is<br></div><div><br></div><div>PS1=3D&quo=
t;\u@\h \w\$&quot; &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-=
4.8.3/bin/conda&quot; =C2=A0 shell.posix &quot;activate&quot; &quot;base&qu=
ot;</div><div><br></div><div>4) conda runs<br></div><div><br></div><div>#!/=
gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash</di=
v><div>export PYTHONPATH=3D&quot;/gnu/store.....&quot;</div><div>exec -a &q=
uot;$0&quot; &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/=
bin/.conda-real&quot; &quot;$@&quot;<br></div><div><br></div><div>5) .conda=
.real generates the prompt in Python:<br></div><div><br></div><div>from con=
da.cli import main<br>sys.exit(main())<br></div><div><br></div><div>6) .con=
da.real outputs</div><div>PS1=3D&#39;(base) &#39;<br>export PATH=3D&#39;...=
</div><div><br></div><div>The problem with the prompt arises from step 4), =
because &#39;conda&#39; has bash as interpreter, and &quot;non-interactive =
bashes go out of their way to unset PS1&quot;:</div><div><a href=3D"https:/=
/superuser.com/questions/663069/why-does-subshell-not-inherit-exported-vari=
able-ps1">https://superuser.com/questions/663069/why-does-subshell-not-inhe=
rit-exported-variable-ps1</a></div><div><a href=3D"https://tldp.org/HOWTO/B=
ash-Prompt-HOWTO/setps.html">https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps=
.html</a></div><div><br></div><div>So .conda.real never gets the PS1 variab=
le and it disappears.</div><div><br></div><div>I don&#39;t really understan=
d why there is a bash function, a conda bash script and a .conda-real pytho=
n script.</div><div><br></div></div><div class=3D"gmail_quote"><div>My loca=
l miniconda 4.8.3 installation on an Ubuntu machine (in my home directory) =
does not have a &quot;.conda-real&quot;: &quot;conda&quot; directly is the =
Python script, so everything works.<br></div><div>=C2=A0</div><div> Maybe m=
ore later.</div><div><br></div><div>Hugo</div><div><br></div><div><br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Ricardo<br>
</blockquote></div></div>

--0000000000009f441605ad907366--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Aug 2020 19:26:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 23 15:26:58 2020
Received: from localhost ([127.0.0.1]:55152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k9vdp-0005AC-NV
	for submit <at> debbugs.gnu.org; Sun, 23 Aug 2020 15:26:58 -0400
Received: from lists.gnu.org ([209.51.188.17]:41072)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1k9vdn-00059y-KF
 for submit <at> debbugs.gnu.org; Sun, 23 Aug 2020 15:26:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35752)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k9vdn-0003v2-Dr
 for bug-guix@HIDDEN; Sun, 23 Aug 2020 15:26:55 -0400
Received: from mail-pj1-f54.google.com ([209.85.216.54]:33096)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k9vdk-0003qq-MS
 for bug-guix@HIDDEN; Sun, 23 Aug 2020 15:26:55 -0400
Received: by mail-pj1-f54.google.com with SMTP id q93so2421419pjq.0
 for <bug-guix@HIDDEN>; Sun, 23 Aug 2020 12:26:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=sJUq2M0TUo575Kc0WiPrzMKym4LaG3lqNqxH6LmdSY8=;
 b=uCubvFi5BlfKTcf1KPL//4Jtii4D3oyjReXZGE36DkMcaCalaevdbnfYZ+4Maecagq
 LEQ58KLx94xmLx4ziBwQq9CeSbVmWvnEPQYRsfgWb1LN6r0k9EVqkYmrRvtRonGDBqMT
 IBTDLUHNFJdDeRVfMl8cePTjpqW5AvjU50oKO/6RSiHfpuSnwf6lZ2cdKd4KxOlzWtm0
 5QMBGsvuMAAHPoBfZqI6Sl2ri3ah09IZsSnx9eeV8jR34xuulTxZzviRQEIrI2m3ovLx
 F4bQfwyxm0m/g8XePP7Q2U8rBr+c828i5p2ljflfqdLkO3gIA1xltDcMZYhbDinrxPX/
 UP4A==
X-Gm-Message-State: AOAM532LQ6cy9uBBNyPVsrGzoJA+Goe33Psh12rtWAy+JXZcMBqWb+5K
 GDpKuF4KryQquOWWAHkGGTGIZaKOwx60ShWo7xw=
X-Google-Smtp-Source: ABdhPJz3tz4XJRo+zXjqUyBDn83Gisp0RbQ+UEvDOPhiahNorN1QBUNvKisdEUOV9nyVWKxyYT/aTyelp+priL1nAKI=
X-Received: by 2002:a17:902:523:: with SMTP id
 32mr1532046plf.176.1598210810265; 
 Sun, 23 Aug 2020 12:26:50 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
 <87364gy7tw.fsf@HIDDEN>
In-Reply-To: <87364gy7tw.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Sun, 23 Aug 2020 21:26:39 +0200
Message-ID: <CA+Jv8O1NFPMZ+bcDNmzLhNq_KGjqsR67g_c-EOHEpfg47f070A@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000009f441605ad907366"
Received-SPF: pass client-ip=209.85.216.54; envelope-from=blackshift@HIDDEN;
 helo=mail-pj1-f54.google.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/23 15:26:50
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -13
X-Spam_score: -1.4
X-Spam_bar: -
X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

--0000000000009f441605ad907366
Content-Type: text/plain; charset="UTF-8"

Just sharing a bit of more info about why the conda prompt breaks.

On Fri, 21 Aug 2020 at 05:52, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> Hugo Buddelmeijer <hugo@HIDDEN> writes:
>
> > 2. The prompt is not set correctly, as in, what should happen is that the
> > current conda environment is added to the prompt. Instead, the prompt is
> > replaced entirely by the environment. This shouldn't be too hard to fix
> > manually though.
>
> Weird!  Is this something Conda does wrong because it assumes too much
> about the existing prompt?
>

This is what happens, reducing the files to the essence:

1) .bashrc runs

__conda_setup="$('/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda'
'shell.bash' 'hook' 2> /dev/null)"
eval "$__conda_setup"

2) __conda_setup runs

__conda_activate() {
    ask_conda="$(PS1="$PS1" "$CONDA_EXE" $_CE_M $_CE_CONDA shell.posix
"$cmd" "$@")" || \return $?
    \eval "$ask_conda"
}
conda activate base

3) ask_conda will contain the new PS1 definition. The command ran to create
ask_conda  is

PS1="\u@\h \w\$"
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda"
shell.posix "activate" "base"

4) conda runs

#!/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
export PYTHONPATH="/gnu/store....."
exec -a "$0"
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.conda-real"
"$@"

5) .conda.real generates the prompt in Python:

from conda.cli import main
sys.exit(main())

6) .conda.real outputs
PS1='(base) '
export PATH='...

The problem with the prompt arises from step 4), because 'conda' has bash
as interpreter, and "non-interactive bashes go out of their way to unset
PS1":
https://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-variable-ps1
https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

So .conda.real never gets the PS1 variable and it disappears.

I don't really understand why there is a bash function, a conda bash script
and a .conda-real python script.

My local miniconda 4.8.3 installation on an Ubuntu machine (in my home
directory) does not have a ".conda-real": "conda" directly is the Python
script, so everything works.

Maybe more later.

Hugo



> --
> Ricardo
>

--0000000000009f441605ad907366
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Just sharing a bit of more info about why the conda p=
rompt breaks.</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Fri, 21 Aug 2020 at 05:52, Ricardo Wurmus &lt;<a href=3D"ma=
ilto:rekado@HIDDEN">rekado@HIDDEN</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex"><br>
Hugo Buddelmeijer &lt;<a href=3D"mailto:hugo@HIDDEN" target=3D"_bl=
ank">hugo@HIDDEN</a>&gt; writes:<br>
<br>
&gt; 2. The prompt is not set correctly, as in, what should happen is that =
the<br>
&gt; current conda environment is added to the prompt. Instead, the prompt =
is<br>
&gt; replaced entirely by the environment. This shouldn&#39;t be too hard t=
o fix<br>
&gt; manually though.<br>
<br>
Weird!=C2=A0 Is this something Conda does wrong because it assumes too much=
<br>
about the existing prompt?<br></blockquote><div><br></div><div>This is what=
 happens, reducing the files to the essence:</div><div><br></div><div>1) .b=
ashrc runs<br></div><div><br></div><div>__conda_setup=3D&quot;$(&#39;/gnu/s=
tore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda&#39; &#39;shell=
.bash&#39; &#39;hook&#39; 2&gt; /dev/null)&quot;<br>eval &quot;$__conda_set=
up&quot;<br></div><div><br></div><div>2) __conda_setup runs<br></div><div><=
br></div><div>__conda_activate() {<br>=C2=A0 =C2=A0 ask_conda=3D&quot;$(PS1=
=3D&quot;$PS1&quot; &quot;$CONDA_EXE&quot; $_CE_M $_CE_CONDA shell.posix &q=
uot;$cmd&quot; &quot;$@&quot;)&quot; || \return $?<br>	=C2=A0 =C2=A0 \eval =
&quot;$ask_conda&quot;<br>}<br></div><div>conda activate base<br></div><div=
><br></div><div>3) ask_conda will contain the new PS1 definition. The comma=
nd ran to create ask_conda=C2=A0 is<br></div><div><br></div><div>PS1=3D&quo=
t;\u@\h \w\$&quot; &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-=
4.8.3/bin/conda&quot; =C2=A0 shell.posix &quot;activate&quot; &quot;base&qu=
ot;</div><div><br></div><div>4) conda runs<br></div><div><br></div><div>#!/=
gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash</di=
v><div>export PYTHONPATH=3D&quot;/gnu/store.....&quot;</div><div>exec -a &q=
uot;$0&quot; &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/=
bin/.conda-real&quot; &quot;$@&quot;<br></div><div><br></div><div>5) .conda=
.real generates the prompt in Python:<br></div><div><br></div><div>from con=
da.cli import main<br>sys.exit(main())<br></div><div><br></div><div>6) .con=
da.real outputs</div><div>PS1=3D&#39;(base) &#39;<br>export PATH=3D&#39;...=
</div><div><br></div><div>The problem with the prompt arises from step 4), =
because &#39;conda&#39; has bash as interpreter, and &quot;non-interactive =
bashes go out of their way to unset PS1&quot;:</div><div><a href=3D"https:/=
/superuser.com/questions/663069/why-does-subshell-not-inherit-exported-vari=
able-ps1">https://superuser.com/questions/663069/why-does-subshell-not-inhe=
rit-exported-variable-ps1</a></div><div><a href=3D"https://tldp.org/HOWTO/B=
ash-Prompt-HOWTO/setps.html">https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps=
.html</a></div><div><br></div><div>So .conda.real never gets the PS1 variab=
le and it disappears.</div><div><br></div><div>I don&#39;t really understan=
d why there is a bash function, a conda bash script and a .conda-real pytho=
n script.</div><div><br></div></div><div class=3D"gmail_quote"><div>My loca=
l miniconda 4.8.3 installation on an Ubuntu machine (in my home directory) =
does not have a &quot;.conda-real&quot;: &quot;conda&quot; directly is the =
Python script, so everything works.<br></div><div>=C2=A0</div><div> Maybe m=
ore later.</div><div><br></div><div>Hugo</div><div><br></div><div><br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Ricardo<br>
</blockquote></div></div>

--0000000000009f441605ad907366--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at 42920 <at> debbugs.gnu.org:


Received: (at 42920) by debbugs.gnu.org; 21 Aug 2020 03:52:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 20 23:52:26 2020
Received: from localhost ([127.0.0.1]:44683 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k8y6M-0003jK-5w
	for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 23:52:26 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1k8y6K-0003jB-Hn
 for 42920 <at> debbugs.gnu.org; Thu, 20 Aug 2020 23:52:25 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1597981926; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=jD4FHdJ1rp3r04bZ25IUTKJOFMw4YacVhmCiKpuyzDsOhboWHaluelSs+ACGrFzY1qipqqeKooMdRx+5Mfs3zfBSz8H08FAQy7JCytJ2TrI5cM8Xw6euWNU/jRxun+8vtK1bU3OvMi8p6XNFxfS9V0vqCtdIF2bZUIaJntc7pms=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1597981926;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=X3DTWHiRZBsjWf/xAjNfiZehh94IZs7L4z98+433KmE=; 
 b=GLXNIgi+XdqP7mdnLkYmfwkRhKGYZ3szL9o5eYuCfXk6e3PhmdcY3quSDRyBgCSKwEPbhXmVvAlVWNsP/tqpAf7dmDb+s/odO/LQJOl9zO+sLCo9++nsqVVskdtLtNZL9lCFYmwUPvBqRuHQrrs4jtoD51Lw0vHgAsjUX393BS0=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597981926; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=X3DTWHiRZBsjWf/xAjNfiZehh94IZs7L4z98+433KmE=;
 b=IFUve9DoKCCkmF049VNCq57pcdz7XtJaKBRxAl1kLppHk4L7nVihM7IhKxKbQ8A/
 HopSWOSCKJBuXe8n0RvGlsoUkaTMkPZYKhooKhD4BfhI8Y4bMSEZoCXBTwTIklMwkpg
 kLA8rTQT133nH3wfP8y/s7ymWn2lhm3fHCol/7lA=
Received: from localhost (p54ad4dde.dip0.t-ipconnect.de [84.173.77.222]) by
 mx.zohomail.com with SMTPS id 1597981919942706.723773905097;
 Thu, 20 Aug 2020 20:51:59 -0700 (PDT)
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
User-agent: mu4e 1.4.10; emacs 26.3
From: Ricardo Wurmus <rekado@HIDDEN>
To: Hugo Buddelmeijer <hugo@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
In-reply-to: <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Fri, 21 Aug 2020 05:51:55 +0200
Message-ID: <87364gy7tw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 42920
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hugo Buddelmeijer <hugo@HIDDEN> writes:

> So there are three problems:
>
> 1. The PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not =
to
> /gnu/store directly. This is trivial to fix manually.

Perhaps we can replace these locations with
${GUIX_PROFILE:-/gnu/store/=E2=80=A6} just as we do in our generated etc/pr=
ofile
file.

> 2. The prompt is not set correctly, as in, what should happen is that the
> current conda environment is added to the prompt. Instead, the prompt is
> replaced entirely by the environment. This shouldn't be too hard to fix
> manually though.

Weird!  Is this something Conda does wrong because it assumes too much
about the existing prompt?

> 3. The installed software does not have the proper interpreter set. This
> can probably be fixed with patchelf, but now I'm wondering whether this is
> the right approach, because that would be necessary for all packages
> installed through conda. (Or is there a way to do that automatically?
> Apparently just symlinking ld-linux-x86.so.2 into (from?) /lib64 also
> works, but that feels like a very un-guixy hack.)

There=E2=80=99s nothing we can do about this in a general fashion.  Creatin=
g a
link from /lib64/ld-linux-x86-64.so.2 to the loader in the glibc package
is indeed what is necessary on Guix System.  If you don=E2=80=99t like to do
this manually, you can use the extra-special-file service.

> Sidenote, FWIW, there are also some problems with some of the scripts
> installed in /gnu/store:
>
> hugo@alex ~$
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda
> -bash:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/python: bad
> interpreter: No such file or directory
> hugo@alex ~$
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
> 3:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-rea=
l:
> Permission denied
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
> 3: exec:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-rea=
l:
> cannot execute: Permission denied
>
> It seems not necessary to actually use these scripts though.

Would be good to fix them, though.  The activate script may just need a
chmod.  Obviously, the bin/python thing is dead wrong =E2=80=94 I must have
missed that instance of prefix confusion that litters the Conda code
base.

> Once we settle on a good way to approach this, where should we document
> this? As in, if we want users to ignore the complaints from conda and
> instead put something in their .bashrc manually, then that information
> should be discoverable somehow.

We shouldn=E2=80=99t need to document this at all; we should patch Conda to=
 do
mostly the right thing.  This involves limiting =E2=80=9Cconda init=E2=80=
=9D to
user-level changes.

--=20
Ricardo




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Aug 2020 03:52:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 20 23:52:31 2020
Received: from localhost ([127.0.0.1]:44685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k8y6Q-0003jZ-Q6
	for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 23:52:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:40090)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1k8y6M-0003jJ-0J
 for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 23:52:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41306)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1k8y6I-0007BO-SV
 for bug-guix@HIDDEN; Thu, 20 Aug 2020 23:52:24 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21154)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1k8y68-000765-4U
 for bug-guix@HIDDEN; Thu, 20 Aug 2020 23:52:22 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1597981926; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=jD4FHdJ1rp3r04bZ25IUTKJOFMw4YacVhmCiKpuyzDsOhboWHaluelSs+ACGrFzY1qipqqeKooMdRx+5Mfs3zfBSz8H08FAQy7JCytJ2TrI5cM8Xw6euWNU/jRxun+8vtK1bU3OvMi8p6XNFxfS9V0vqCtdIF2bZUIaJntc7pms=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1597981926;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=X3DTWHiRZBsjWf/xAjNfiZehh94IZs7L4z98+433KmE=; 
 b=GLXNIgi+XdqP7mdnLkYmfwkRhKGYZ3szL9o5eYuCfXk6e3PhmdcY3quSDRyBgCSKwEPbhXmVvAlVWNsP/tqpAf7dmDb+s/odO/LQJOl9zO+sLCo9++nsqVVskdtLtNZL9lCFYmwUPvBqRuHQrrs4jtoD51Lw0vHgAsjUX393BS0=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597981926; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=X3DTWHiRZBsjWf/xAjNfiZehh94IZs7L4z98+433KmE=;
 b=IFUve9DoKCCkmF049VNCq57pcdz7XtJaKBRxAl1kLppHk4L7nVihM7IhKxKbQ8A/
 HopSWOSCKJBuXe8n0RvGlsoUkaTMkPZYKhooKhD4BfhI8Y4bMSEZoCXBTwTIklMwkpg
 kLA8rTQT133nH3wfP8y/s7ymWn2lhm3fHCol/7lA=
Received: from localhost (p54ad4dde.dip0.t-ipconnect.de [84.173.77.222]) by
 mx.zohomail.com with SMTPS id 1597981919942706.723773905097;
 Thu, 20 Aug 2020 20:51:59 -0700 (PDT)
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
 <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
User-agent: mu4e 1.4.10; emacs 26.3
From: Ricardo Wurmus <rekado@HIDDEN>
To: Hugo Buddelmeijer <hugo@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
In-reply-to: <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Fri, 21 Aug 2020 05:51:55 +0200
Message-ID: <87364gy7tw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@HIDDEN;
 helo=sender4-of-o51.zoho.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:52:07
X-ACL-Warn: Detected OS   = Linux 3.11 and newer [fuzzy]
X-Spam_score_int: -30
X-Spam_score: -3.1
X-Spam_bar: ---
X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Hugo Buddelmeijer <hugo@HIDDEN> writes:

> So there are three problems:
>
> 1. The PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not =
to
> /gnu/store directly. This is trivial to fix manually.

Perhaps we can replace these locations with
${GUIX_PROFILE:-/gnu/store/=E2=80=A6} just as we do in our generated etc/pr=
ofile
file.

> 2. The prompt is not set correctly, as in, what should happen is that the
> current conda environment is added to the prompt. Instead, the prompt is
> replaced entirely by the environment. This shouldn't be too hard to fix
> manually though.

Weird!  Is this something Conda does wrong because it assumes too much
about the existing prompt?

> 3. The installed software does not have the proper interpreter set. This
> can probably be fixed with patchelf, but now I'm wondering whether this is
> the right approach, because that would be necessary for all packages
> installed through conda. (Or is there a way to do that automatically?
> Apparently just symlinking ld-linux-x86.so.2 into (from?) /lib64 also
> works, but that feels like a very un-guixy hack.)

There=E2=80=99s nothing we can do about this in a general fashion.  Creatin=
g a
link from /lib64/ld-linux-x86-64.so.2 to the loader in the glibc package
is indeed what is necessary on Guix System.  If you don=E2=80=99t like to do
this manually, you can use the extra-special-file service.

> Sidenote, FWIW, there are also some problems with some of the scripts
> installed in /gnu/store:
>
> hugo@alex ~$
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda
> -bash:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/python: bad
> interpreter: No such file or directory
> hugo@alex ~$
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
> 3:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-rea=
l:
> Permission denied
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
> 3: exec:
> /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-rea=
l:
> cannot execute: Permission denied
>
> It seems not necessary to actually use these scripts though.

Would be good to fix them, though.  The activate script may just need a
chmod.  Obviously, the bin/python thing is dead wrong =E2=80=94 I must have
missed that instance of prefix confusion that litters the Conda code
base.

> Once we settle on a good way to approach this, where should we document
> this? As in, if we want users to ignore the complaints from conda and
> instead put something in their .bashrc manually, then that information
> should be discoverable somehow.

We shouldn=E2=80=99t need to document this at all; we should patch Conda to=
 do
mostly the right thing.  This involves limiting =E2=80=9Cconda init=E2=80=
=9D to
user-level changes.

--=20
Ricardo




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at 42920 <at> debbugs.gnu.org:


Received: (at 42920) by debbugs.gnu.org; 20 Aug 2020 17:38:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 20 13:38:55 2020
Received: from localhost ([127.0.0.1]:43880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k8oWc-0004GR-PF
	for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 13:38:55 -0400
Received: from mail-pl1-f176.google.com ([209.85.214.176]:45593)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1k8nb0-0006j2-Kn
 for 42920 <at> debbugs.gnu.org; Thu, 20 Aug 2020 12:39:23 -0400
Received: by mail-pl1-f176.google.com with SMTP id bh1so1175331plb.12
 for <42920 <at> debbugs.gnu.org>; Thu, 20 Aug 2020 09:39:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=L1Q2RCOmFFFesk3NijohkvIjX+5gM7TyWvbOqMEmNCo=;
 b=fZtW8AyKBJQ6t7uKR10I6DLruTJn3JoI/KpESOp6FnZ6NSBgSdJ76oU68CYDoZkoHF
 EExC5dTvsHSL6LdHpvmZ83bjs+uceGmhslbFqnj5+07n5Gl7r5vDDVs/pEfc12NC9FU0
 r+Md2lZyon5rG8A+HnuArrwQ/QBixlmU9Ka5Y+4YYv4H8ZUzsb+x9ta/OtMhhr87X8K6
 /GfY2Rg1q1blOPv7MLT0snFS9TUSnDR8Jf1/tWthtWYN2UJqCSOTQL+US2uDRB1FKFtF
 rerHyyP50aALqXtcYJOhf9zqDLXOW1lPjXr3u4M/e3V/8wsMRmsZyl74Zsj0Fgd5Brrm
 9uHQ==
X-Gm-Message-State: AOAM530Y4eQGTvBkDVZoY7FYYieIYJDEmnb5zgV/gravDOA8DMCBxXTk
 hrv76Kz0sp6X3l+9dpm3WsFgFntxLfoHrFZUNGusrEsSl180tg==
X-Google-Smtp-Source: ABdhPJxzylV1GUCLTPUiMyW3hOeMt2lDCOAylRD+RnaRCxr7vT+qWSXNzr8fO9bvsAzCZS58gHGqlnvO7dHdC79eoyQ=
X-Received: by 2002:a17:90a:fb4b:: with SMTP id
 iq11mr3152803pjb.127.1597941556452; 
 Thu, 20 Aug 2020 09:39:16 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
In-Reply-To: <87blj7x841.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Thu, 20 Aug 2020 18:39:05 +0200
Message-ID: <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000d823d105ad51c234"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 42920
X-Mailman-Approved-At: Thu, 20 Aug 2020 13:38:52 -0400
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--000000000000d823d105ad51c234
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Ricardo,

On Wed, 19 Aug 2020 at 12:07, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> > The conda 4.8.3 package on guix does not seem to work as expected.
>
> Thanks for letting me know.  The upgrade took a long time and required
> quite a bit of patching.
>

Thanks for doing this hard work! It is much appreciated, I don't think I
would have started experimenting with guix without your head start.


> > But activating it does not work properly:
> >
> > hugo@alex ~$ conda activate testenv
> >
> > CommandNotFoundError: Your shell has not been properly configured to us=
e
> > 'conda activate'.
> > To initialize your shell, run
> >
> >     $ conda init <SHELL_NAME>
>
> This is very unfortunate, but perhaps we can work around this.
> Initially I noticed that almost none of the Conda features worked
> without =E2=80=9Cconda init=E2=80=9D, so I decided to run =E2=80=9Cconda =
init=E2=80=9D as part of the
> build.  This installs a whole bunch of shell initialization files into
> the prefix directory, which =E2=80=94 I assume =E2=80=94 are meant to be =
evaluated when
> the shell starts.
>
> So I suspect that you can get around this by manually sourcing the
> appropriate shell init files.  Which of these need to be sourced
> probably depends on your current shell.
>

That indeed kinda works. `conda init bash` adds this to `.bashrc`
(apparently before asking for the sudo password):

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup=3D"$('/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3=
/bin/conda'
'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/cond=
a.sh"
]; then
        .
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/cond=
a.sh"
    else
        export
PATH=3D"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

And running this will indeed allow an environment to be activated. The
`testenv3` environment contains only Python:

hugo@alex ~$ which python
which: no python in
(/run/setuid-programs:/home/hugo/.config/guix/current/bin:/home/hugo/.guix-=
profile/bin:/run/current-system/profile/bin:/run/current-system/profile/sbi=
n)
hugo@alex ~$ source .bashrc
(base) conda activate testenv3
(testenv3)
(testenv3) which python
/home/hugo/.conda/envs/testenv3/bin/python
(testenv3) python
-bash: /home/hugo/.conda/envs/testenv3/bin/python: No such file or director=
y
(testenv3) readelf --all $(which python) | grep interpreter
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

So there are three problems:

1. The PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not to
/gnu/store directly. This is trivial to fix manually.

2. The prompt is not set correctly, as in, what should happen is that the
current conda environment is added to the prompt. Instead, the prompt is
replaced entirely by the environment. This shouldn't be too hard to fix
manually though.

3. The installed software does not have the proper interpreter set. This
can probably be fixed with patchelf, but now I'm wondering whether this is
the right approach, because that would be necessary for all packages
installed through conda. (Or is there a way to do that automatically?
Apparently just symlinking ld-linux-x86.so.2 into (from?) /lib64 also
works, but that feels like a very un-guixy hack.)

Sidenote, FWIW, there are also some problems with some of the scripts
installed in /gnu/store:

hugo@alex ~$
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda
-bash:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/python: bad
interpreter: No such file or directory
hugo@alex ~$
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
3:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-real:
Permission denied
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
3: exec:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-real:
cannot execute: Permission denied

It seems not necessary to actually use these scripts though.

Ultimately it would be nice if all conda packages would be available in
guix directly (as guix packages, removing the need for conda), but that is
going to take a while. The above workarounds are probably sufficient to get
something going until then.

Once we settle on a good way to approach this, where should we document
this? As in, if we want users to ignore the complaints from conda and
instead put something in their .bashrc manually, then that information
should be discoverable somehow.

> FWIW, maybe it would be simpler to create a micromamba package than a
> conda
> > package:
> > https://github.com/TheSnakePit/mamba
>
> Why not both?
>

Maybe I'll give it a shot. (micro)mamba is still a bit unstable it seems,
but it might be a good fit for guix.

Cheers,
Hugo

--000000000000d823d105ad51c234
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Ricardo,<br></div><br><div class=3D"gmail_quote"><=
div dir=3D"ltr" class=3D"gmail_attr">On Wed, 19 Aug 2020 at 12:07, Ricardo =
Wurmus &lt;<a href=3D"mailto:rekado@HIDDEN">rekado@HIDDEN</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; The conda 4.8.3 package on guix does not seem to work as expected.<br>
<br>
Thanks for letting me know.=C2=A0 The upgrade took a long time and required=
<br>
quite a bit of patching.<br></blockquote><div><br></div><div>Thanks for doi=
ng this hard work! It is much appreciated, I don&#39;t think I would have s=
tarted experimenting with guix without your head start.<br></div><div>=C2=
=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt; But activating it does not work properly:<br>
&gt;<br>
&gt; hugo@alex ~$ conda activate testenv<br>
&gt;<br>
&gt; CommandNotFoundError: Your shell has not been properly configured to u=
se<br>
&gt; &#39;conda activate&#39;.<br>
&gt; To initialize your shell, run<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0$ conda init &lt;SHELL_NAME&gt;<br>
<br>
This is very unfortunate, but perhaps we can work around this.<br>
Initially I noticed that almost none of the Conda features worked<br>
without =E2=80=9Cconda init=E2=80=9D, so I decided to run =E2=80=9Cconda in=
it=E2=80=9D as part of the<br>
build.=C2=A0 This installs a whole bunch of shell initialization files into=
<br>
the prefix directory, which =E2=80=94 I assume =E2=80=94 are meant to be ev=
aluated when<br>
the shell starts.<br>
<br>
So I suspect that you can get around this by manually sourcing the<br>
appropriate shell init files.=C2=A0 Which of these need to be sourced<br>
probably depends on your current shell.<br></blockquote><div><br></div><div=
>That indeed kinda works. `conda init bash` adds this to `.bashrc` (apparen=
tly before asking for the sudo password):</div><div><br></div><div># &gt;&g=
t;&gt; conda initialize &gt;&gt;&gt;<br># !! Contents within this block are=
 managed by &#39;conda init&#39; !!<br>__conda_setup=3D&quot;$(&#39;/gnu/st=
ore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda&#39; &#39;shell.=
bash&#39; &#39;hook&#39; 2&gt; /dev/null)&quot;<br>if [ $? -eq 0 ]; then<br=
>=C2=A0 =C2=A0 eval &quot;$__conda_setup&quot;<br>else<br>=C2=A0 =C2=A0 if =
[ -f &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/prof=
ile.d/conda.sh&quot; ]; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 . &quot;/gnu/st=
ore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/conda.sh&quo=
t;<br>=C2=A0 =C2=A0 else<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 export PATH=3D&quot=
;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin:$PATH&quot;<br=
>=C2=A0 =C2=A0 fi<br>fi<br>unset __conda_setup<br># &lt;&lt;&lt; conda init=
ialize &lt;&lt;&lt;<br></div><div><br></div><div>And running this will inde=
ed allow an environment to be activated. The `testenv3` environment contain=
s only Python:</div><div><br></div><div>hugo@alex ~$ which python<br>which:=
 no python in (/run/setuid-programs:/home/hugo/.config/guix/current/bin:/ho=
me/hugo/.guix-profile/bin:/run/current-system/profile/bin:/run/current-syst=
em/profile/sbin)<br>hugo@alex ~$ source .bashrc<br>(base) conda activate te=
stenv3<br>(testenv3) <br>(testenv3) which python<br>/home/hugo/.conda/envs/=
testenv3/bin/python<br>(testenv3) python<br>-bash: /home/hugo/.conda/envs/t=
estenv3/bin/python: No such file or directory<br></div><div>(testenv3) read=
elf --all $(which python) | grep interpreter<br>=C2=A0 =C2=A0 =C2=A0 [Reque=
sting program interpreter: /lib64/ld-linux-x86-64.so.2]<br></div><div><br><=
/div><div>So there are three problems:</div><div><br></div><div><div>1. The=
 PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not to /gnu/=
store directly. This is trivial to fix manually.<br></div></div><div><br></=
div><div>2. The prompt is not set correctly, as in, what should happen is t=
hat the current conda environment is added to the prompt. Instead, the prom=
pt is replaced entirely by the environment. This shouldn&#39;t be too hard =
to fix manually though.<br></div><div><br></div><div>3. The installed softw=
are does not have the proper interpreter set. This can probably be fixed wi=
th patchelf, but now I&#39;m wondering whether this is the right approach, =
because that would be necessary for all packages installed through conda. (=
Or is there a way to do that automatically? Apparently just symlinking ld-l=
inux-x86.so.2 into (from?) /lib64 also works, but that feels like a very un=
-guixy hack.)<br></div><div><br></div><div><div>Sidenote, FWIW, there are a=
lso some problems with some of the scripts installed in /gnu/store:</div><d=
iv><br></div>hugo@alex ~$ /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda=
-4.8.3/condabin/conda<br>-bash: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx=
-conda-4.8.3/condabin/conda: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-co=
nda-4.8.3/bin/python: bad interpreter: No such file or directory<br><div>hu=
go@alex ~$ /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/acti=
vate <br>/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activa=
te: line 3: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.ac=
tivate-real: Permission denied<br>/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518w=
mx-conda-4.8.3/bin/activate: line 3: exec: /gnu/store/ihn8dbs84rmc3ai7r1vkv=
h4cya518wmx-conda-4.8.3/bin/.activate-real: cannot execute: Permission deni=
ed<br></div></div><div><br></div><div>It seems not necessary to actually us=
e these scripts though. <br></div><div><br></div><div>Ultimately it would b=
e nice if all conda packages would be available in guix directly (as guix p=
ackages, removing the need for conda), but that is going to take a while. T=
he above workarounds are probably sufficient to get something going until t=
hen.<br></div><div><br></div><div>Once we settle on a good way to approach =
this, where should we document this? As in, if we want users to ignore the =
complaints from conda and instead put something in their .bashrc manually, =
then that information should be discoverable somehow.</div><div><br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex">
&gt; FWIW, maybe it would be simpler to create a micromamba package than a =
conda<br>
&gt; package:<br>
&gt; <a href=3D"https://github.com/TheSnakePit/mamba" rel=3D"noreferrer" ta=
rget=3D"_blank">https://github.com/TheSnakePit/mamba</a><br>
<br>
Why not both?<br></blockquote><div><br></div><div>Maybe I&#39;ll give it a =
shot. (micro)mamba is still a bit unstable it seems, but it might be a good=
 fit for guix. <br></div><div><br></div><div>Cheers,</div><div>Hugo</div><d=
iv><br></div></div></div>

--000000000000d823d105ad51c234--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Aug 2020 17:38:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 20 13:38:54 2020
Received: from localhost ([127.0.0.1]:43878 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k8oWb-0004GO-NS
	for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 13:38:54 -0400
Received: from lists.gnu.org ([209.51.188.17]:34602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1k8naz-0006j9-51
 for submit <at> debbugs.gnu.org; Thu, 20 Aug 2020 12:39:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59394)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k8nay-0001k4-UU
 for bug-guix@HIDDEN; Thu, 20 Aug 2020 12:39:20 -0400
Received: from mail-pj1-f49.google.com ([209.85.216.49]:38580)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k8naw-0003X5-FT
 for bug-guix@HIDDEN; Thu, 20 Aug 2020 12:39:20 -0400
Received: by mail-pj1-f49.google.com with SMTP id ep8so1220324pjb.3
 for <bug-guix@HIDDEN>; Thu, 20 Aug 2020 09:39:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=L1Q2RCOmFFFesk3NijohkvIjX+5gM7TyWvbOqMEmNCo=;
 b=K0vx51W/pX4GgVyYrpReSXDwhXtWQWL52B4Lh5lFZEPoh9a/jB23l2/homMNT0ZzPJ
 SIYkNo17Yi3gJk82stozQdyNWfLbI4krwIG8RJzyis4PsV/qGmNSxUgQOnqTFMrkk/Wj
 xs2rFXghChzQDXKsMzTWaXvBvcijSHEvKdGLoJy/o6jUuxqkFMh7usYO9Ekq5SnWWNmu
 txl64XsgQgRf0eg5muyGTTBrC0+4UFwkcZKcuW74t1aD3h9I34+jaIp04Ld/Pg+8otye
 FBtuHZ4Fjf4uA1H2zzhzAAnAFiWaGFj3nIMos1S08ORAT2DZxjbm1ier6HZ24bxTqvFS
 5fOA==
X-Gm-Message-State: AOAM530nLA4bZQzAoqvOZfSkX1ScjMISRkd897WaqGh034vUA3z3gQHn
 gp5pHXSlrGbsmENd4yd3gI+uUH1TDzOLmWYStcI=
X-Google-Smtp-Source: ABdhPJxzylV1GUCLTPUiMyW3hOeMt2lDCOAylRD+RnaRCxr7vT+qWSXNzr8fO9bvsAzCZS58gHGqlnvO7dHdC79eoyQ=
X-Received: by 2002:a17:90a:fb4b:: with SMTP id
 iq11mr3152803pjb.127.1597941556452; 
 Thu, 20 Aug 2020 09:39:16 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
 <87blj7x841.fsf@HIDDEN>
In-Reply-To: <87blj7x841.fsf@HIDDEN>
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Thu, 20 Aug 2020 18:39:05 +0200
Message-ID: <CA+Jv8O0g44LWn7_FDHNjRRq61bYYG_AMoYr3BgyHU-_tD_1UCQ@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
To: Ricardo Wurmus <rekado@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000d823d105ad51c234"
Received-SPF: pass client-ip=209.85.216.49; envelope-from=blackshift@HIDDEN;
 helo=mail-pj1-f49.google.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 12:39:17
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: 1
X-Spam_score: 0.1
X-Spam_bar: /
X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=1,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 20 Aug 2020 13:38:52 -0400
Cc: bug-guix@HIDDEN, 42920 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

--000000000000d823d105ad51c234
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Ricardo,

On Wed, 19 Aug 2020 at 12:07, Ricardo Wurmus <rekado@HIDDEN> wrote:

>
> > The conda 4.8.3 package on guix does not seem to work as expected.
>
> Thanks for letting me know.  The upgrade took a long time and required
> quite a bit of patching.
>

Thanks for doing this hard work! It is much appreciated, I don't think I
would have started experimenting with guix without your head start.


> > But activating it does not work properly:
> >
> > hugo@alex ~$ conda activate testenv
> >
> > CommandNotFoundError: Your shell has not been properly configured to us=
e
> > 'conda activate'.
> > To initialize your shell, run
> >
> >     $ conda init <SHELL_NAME>
>
> This is very unfortunate, but perhaps we can work around this.
> Initially I noticed that almost none of the Conda features worked
> without =E2=80=9Cconda init=E2=80=9D, so I decided to run =E2=80=9Cconda =
init=E2=80=9D as part of the
> build.  This installs a whole bunch of shell initialization files into
> the prefix directory, which =E2=80=94 I assume =E2=80=94 are meant to be =
evaluated when
> the shell starts.
>
> So I suspect that you can get around this by manually sourcing the
> appropriate shell init files.  Which of these need to be sourced
> probably depends on your current shell.
>

That indeed kinda works. `conda init bash` adds this to `.bashrc`
(apparently before asking for the sudo password):

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup=3D"$('/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3=
/bin/conda'
'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/cond=
a.sh"
]; then
        .
"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/cond=
a.sh"
    else
        export
PATH=3D"/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

And running this will indeed allow an environment to be activated. The
`testenv3` environment contains only Python:

hugo@alex ~$ which python
which: no python in
(/run/setuid-programs:/home/hugo/.config/guix/current/bin:/home/hugo/.guix-=
profile/bin:/run/current-system/profile/bin:/run/current-system/profile/sbi=
n)
hugo@alex ~$ source .bashrc
(base) conda activate testenv3
(testenv3)
(testenv3) which python
/home/hugo/.conda/envs/testenv3/bin/python
(testenv3) python
-bash: /home/hugo/.conda/envs/testenv3/bin/python: No such file or director=
y
(testenv3) readelf --all $(which python) | grep interpreter
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

So there are three problems:

1. The PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not to
/gnu/store directly. This is trivial to fix manually.

2. The prompt is not set correctly, as in, what should happen is that the
current conda environment is added to the prompt. Instead, the prompt is
replaced entirely by the environment. This shouldn't be too hard to fix
manually though.

3. The installed software does not have the proper interpreter set. This
can probably be fixed with patchelf, but now I'm wondering whether this is
the right approach, because that would be necessary for all packages
installed through conda. (Or is there a way to do that automatically?
Apparently just symlinking ld-linux-x86.so.2 into (from?) /lib64 also
works, but that feels like a very un-guixy hack.)

Sidenote, FWIW, there are also some problems with some of the scripts
installed in /gnu/store:

hugo@alex ~$
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda
-bash:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/python: bad
interpreter: No such file or directory
hugo@alex ~$
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
3:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-real:
Permission denied
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate: line
3: exec:
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.activate-real:
cannot execute: Permission denied

It seems not necessary to actually use these scripts though.

Ultimately it would be nice if all conda packages would be available in
guix directly (as guix packages, removing the need for conda), but that is
going to take a while. The above workarounds are probably sufficient to get
something going until then.

Once we settle on a good way to approach this, where should we document
this? As in, if we want users to ignore the complaints from conda and
instead put something in their .bashrc manually, then that information
should be discoverable somehow.

> FWIW, maybe it would be simpler to create a micromamba package than a
> conda
> > package:
> > https://github.com/TheSnakePit/mamba
>
> Why not both?
>

Maybe I'll give it a shot. (micro)mamba is still a bit unstable it seems,
but it might be a good fit for guix.

Cheers,
Hugo

--000000000000d823d105ad51c234
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Ricardo,<br></div><br><div class=3D"gmail_quote"><=
div dir=3D"ltr" class=3D"gmail_attr">On Wed, 19 Aug 2020 at 12:07, Ricardo =
Wurmus &lt;<a href=3D"mailto:rekado@HIDDEN">rekado@HIDDEN</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; The conda 4.8.3 package on guix does not seem to work as expected.<br>
<br>
Thanks for letting me know.=C2=A0 The upgrade took a long time and required=
<br>
quite a bit of patching.<br></blockquote><div><br></div><div>Thanks for doi=
ng this hard work! It is much appreciated, I don&#39;t think I would have s=
tarted experimenting with guix without your head start.<br></div><div>=C2=
=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt; But activating it does not work properly:<br>
&gt;<br>
&gt; hugo@alex ~$ conda activate testenv<br>
&gt;<br>
&gt; CommandNotFoundError: Your shell has not been properly configured to u=
se<br>
&gt; &#39;conda activate&#39;.<br>
&gt; To initialize your shell, run<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0$ conda init &lt;SHELL_NAME&gt;<br>
<br>
This is very unfortunate, but perhaps we can work around this.<br>
Initially I noticed that almost none of the Conda features worked<br>
without =E2=80=9Cconda init=E2=80=9D, so I decided to run =E2=80=9Cconda in=
it=E2=80=9D as part of the<br>
build.=C2=A0 This installs a whole bunch of shell initialization files into=
<br>
the prefix directory, which =E2=80=94 I assume =E2=80=94 are meant to be ev=
aluated when<br>
the shell starts.<br>
<br>
So I suspect that you can get around this by manually sourcing the<br>
appropriate shell init files.=C2=A0 Which of these need to be sourced<br>
probably depends on your current shell.<br></blockquote><div><br></div><div=
>That indeed kinda works. `conda init bash` adds this to `.bashrc` (apparen=
tly before asking for the sudo password):</div><div><br></div><div># &gt;&g=
t;&gt; conda initialize &gt;&gt;&gt;<br># !! Contents within this block are=
 managed by &#39;conda init&#39; !!<br>__conda_setup=3D&quot;$(&#39;/gnu/st=
ore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda&#39; &#39;shell.=
bash&#39; &#39;hook&#39; 2&gt; /dev/null)&quot;<br>if [ $? -eq 0 ]; then<br=
>=C2=A0 =C2=A0 eval &quot;$__conda_setup&quot;<br>else<br>=C2=A0 =C2=A0 if =
[ -f &quot;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/prof=
ile.d/conda.sh&quot; ]; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 . &quot;/gnu/st=
ore/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/conda.sh&quo=
t;<br>=C2=A0 =C2=A0 else<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 export PATH=3D&quot=
;/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin:$PATH&quot;<br=
>=C2=A0 =C2=A0 fi<br>fi<br>unset __conda_setup<br># &lt;&lt;&lt; conda init=
ialize &lt;&lt;&lt;<br></div><div><br></div><div>And running this will inde=
ed allow an environment to be activated. The `testenv3` environment contain=
s only Python:</div><div><br></div><div>hugo@alex ~$ which python<br>which:=
 no python in (/run/setuid-programs:/home/hugo/.config/guix/current/bin:/ho=
me/hugo/.guix-profile/bin:/run/current-system/profile/bin:/run/current-syst=
em/profile/sbin)<br>hugo@alex ~$ source .bashrc<br>(base) conda activate te=
stenv3<br>(testenv3) <br>(testenv3) which python<br>/home/hugo/.conda/envs/=
testenv3/bin/python<br>(testenv3) python<br>-bash: /home/hugo/.conda/envs/t=
estenv3/bin/python: No such file or directory<br></div><div>(testenv3) read=
elf --all $(which python) | grep interpreter<br>=C2=A0 =C2=A0 =C2=A0 [Reque=
sting program interpreter: /lib64/ld-linux-x86-64.so.2]<br></div><div><br><=
/div><div>So there are three problems:</div><div><br></div><div><div>1. The=
 PATHS in .bashrc should be to ~/.guix-profile/etc/profile.d/, not to /gnu/=
store directly. This is trivial to fix manually.<br></div></div><div><br></=
div><div>2. The prompt is not set correctly, as in, what should happen is t=
hat the current conda environment is added to the prompt. Instead, the prom=
pt is replaced entirely by the environment. This shouldn&#39;t be too hard =
to fix manually though.<br></div><div><br></div><div>3. The installed softw=
are does not have the proper interpreter set. This can probably be fixed wi=
th patchelf, but now I&#39;m wondering whether this is the right approach, =
because that would be necessary for all packages installed through conda. (=
Or is there a way to do that automatically? Apparently just symlinking ld-l=
inux-x86.so.2 into (from?) /lib64 also works, but that feels like a very un=
-guixy hack.)<br></div><div><br></div><div><div>Sidenote, FWIW, there are a=
lso some problems with some of the scripts installed in /gnu/store:</div><d=
iv><br></div>hugo@alex ~$ /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda=
-4.8.3/condabin/conda<br>-bash: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx=
-conda-4.8.3/condabin/conda: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-co=
nda-4.8.3/bin/python: bad interpreter: No such file or directory<br><div>hu=
go@alex ~$ /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/acti=
vate <br>/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activa=
te: line 3: /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/.ac=
tivate-real: Permission denied<br>/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518w=
mx-conda-4.8.3/bin/activate: line 3: exec: /gnu/store/ihn8dbs84rmc3ai7r1vkv=
h4cya518wmx-conda-4.8.3/bin/.activate-real: cannot execute: Permission deni=
ed<br></div></div><div><br></div><div>It seems not necessary to actually us=
e these scripts though. <br></div><div><br></div><div>Ultimately it would b=
e nice if all conda packages would be available in guix directly (as guix p=
ackages, removing the need for conda), but that is going to take a while. T=
he above workarounds are probably sufficient to get something going until t=
hen.<br></div><div><br></div><div>Once we settle on a good way to approach =
this, where should we document this? As in, if we want users to ignore the =
complaints from conda and instead put something in their .bashrc manually, =
then that information should be discoverable somehow.</div><div><br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex">
&gt; FWIW, maybe it would be simpler to create a micromamba package than a =
conda<br>
&gt; package:<br>
&gt; <a href=3D"https://github.com/TheSnakePit/mamba" rel=3D"noreferrer" ta=
rget=3D"_blank">https://github.com/TheSnakePit/mamba</a><br>
<br>
Why not both?<br></blockquote><div><br></div><div>Maybe I&#39;ll give it a =
shot. (micro)mamba is still a bit unstable it seems, but it might be a good=
 fit for guix. <br></div><div><br></div><div>Cheers,</div><div>Hugo</div><d=
iv><br></div></div></div>

--000000000000d823d105ad51c234--




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Aug 2020 10:06:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 19 06:06:59 2020
Received: from localhost ([127.0.0.1]:37930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k8Kzi-0005Wu-QP
	for submit <at> debbugs.gnu.org; Wed, 19 Aug 2020 06:06:59 -0400
Received: from lists.gnu.org ([209.51.188.17]:57598)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1k8Kzg-0005Wl-UU
 for submit <at> debbugs.gnu.org; Wed, 19 Aug 2020 06:06:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55524)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1k8Kzg-0000iv-Iv
 for bug-guix@HIDDEN; Wed, 19 Aug 2020 06:06:56 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21132)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256)
 (Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
 id 1k8Kze-0006JO-Fe
 for bug-guix@HIDDEN; Wed, 19 Aug 2020 06:06:56 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1597831607; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=llp/m6Nffty5CpLVmChjFslXD84PacENCzF7jKxmN92OU2nwChrOhvuv1dfkwxbGq2Y/CfvvvJTNh8HY6cbLKb4NHH05WW0QEw/maizyEVBssphlst6wONXZRSIGdcPheQx+erh14RRQ0Qy0aH55dVB9m4oSBHyaajAZFFTfBM8=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1597831607;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=Ibn9EzyfNn0KPNyd2khCGs6iQHWvRndanqkzUBlxGTs=; 
 b=A86wkqzLqbQVLObbO+ONpEhpom1l2z8LX6VI0bbFWQ5/Mmkv2jMOvhQLOrNH2gIkfXAmjIJVCdJXjRUmrVYGCRGbfFJWbj2hx5HTmdhTEWY4H31WoggKeZViPdkEtNBF1UQS+Lbo7QdKxH9jvcLZ1rx+j5pHFWz2lfiI1aNQgDk=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597831607; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=Ibn9EzyfNn0KPNyd2khCGs6iQHWvRndanqkzUBlxGTs=;
 b=gdQ4aAkEDIHGbrCdemq/ELgoeCviY7zQRVSmjw3L+ItKROaNGODd0d8LFkCJbxGL
 O78qxYjvBTqvDDTfIfZy4CZe/5rKmFHlRQplwmH73/tsSaM8zZGbWZ9cd0N/dz0YgHp
 zUEaKGnFTwtC1YLwfiz22dh3tX+f1u8WRp+ksr1c=
Received: from localhost (p54ad4c52.dip0.t-ipconnect.de [84.173.76.82]) by
 mx.zohomail.com with SMTPS id 1597831602234994.0909613050062;
 Wed, 19 Aug 2020 03:06:42 -0700 (PDT)
References: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
User-agent: mu4e 1.4.10; emacs 26.3
From: Ricardo Wurmus <rekado@HIDDEN>
To: Hugo Buddelmeijer <hugo@HIDDEN>
Subject: Re: conda 4.8.3 on guix cannot activate environments
In-reply-to: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Wed, 19 Aug 2020 12:06:38 +0200
Message-ID: <87blj7x841.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@HIDDEN;
 helo=sender4-of-o51.zoho.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/19 06:06:50
X-ACL-Warn: Detected OS   = Linux 3.11 and newer [fuzzy]
X-Spam_score_int: -30
X-Spam_score: -3.1
X-Spam_bar: ---
X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-guix@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Hi Hugo,

> The conda 4.8.3 package on guix does not seem to work as expected.

Thanks for letting me know.  The upgrade took a long time and required
quite a bit of patching.

> But activating it does not work properly:
>
> hugo@alex ~$ conda activate testenv
>
> CommandNotFoundError: Your shell has not been properly configured to use
> 'conda activate'.
> To initialize your shell, run
>
>     $ conda init <SHELL_NAME>

This is very unfortunate, but perhaps we can work around this.
Initially I noticed that almost none of the Conda features worked
without =E2=80=9Cconda init=E2=80=9D, so I decided to run =E2=80=9Cconda in=
it=E2=80=9D as part of the
build.  This installs a whole bunch of shell initialization files into
the prefix directory, which =E2=80=94 I assume =E2=80=94 are meant to be ev=
aluated when
the shell starts.

So I suspect that you can get around this by manually sourcing the
appropriate shell init files.  Which of these need to be sourced
probably depends on your current shell.

> Unfortunately, conda init does not work well, because it needs root
> access: [=E2=80=A6]

Yeah, it=E2=80=99s a terrible design decision on the part of the Conda
developers.  Luckily you won=E2=80=99t need any of that because we already
installed all these files at build time.

> FWIW, maybe it would be simpler to create a micromamba package than a con=
da
> package:
> https://github.com/TheSnakePit/mamba

Why not both?

--=20
Ricardo




Information forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Aug 2020 19:24:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 18 15:24:32 2020
Received: from localhost ([127.0.0.1]:37065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k87Di-0006dd-Eo
	for submit <at> debbugs.gnu.org; Tue, 18 Aug 2020 15:24:32 -0400
Received: from lists.gnu.org ([209.51.188.17]:51802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blackshift@HIDDEN>) id 1k86yA-0006Ei-7S
 for submit <at> debbugs.gnu.org; Tue, 18 Aug 2020 15:08:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54604)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k86yA-0008TS-0R
 for bug-guix@HIDDEN; Tue, 18 Aug 2020 15:08:26 -0400
Received: from mail-pl1-f180.google.com ([209.85.214.180]:32904)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <blackshift@HIDDEN>)
 id 1k86y7-0003Vp-Nu
 for bug-guix@HIDDEN; Tue, 18 Aug 2020 15:08:25 -0400
Received: by mail-pl1-f180.google.com with SMTP id q19so9673364pll.0
 for <bug-guix@HIDDEN>; Tue, 18 Aug 2020 12:08:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
 bh=PDjmq30sEnFkYCj+6xSa0ohES4lYo3trosGGUiP4w1I=;
 b=NzEh0ngSowCB2Li+g82xzsZw3/5LQZQqlJ9vZbDl2Edawl/RG8FyyXwhaFObXCQZUx
 ko10uAt3TFMjZJiuW17k2YqZ/fdHORATTBvzyEzh0n8CliACCoalN/uZcPWqZiKgwCRa
 YlMUOaeS+4l5a8Uaox4QfvF+gohEu67u/4773MlV8M/TtMR8HhFLw8XMdQ6ElEfaBSHh
 rsrkXUQ7vrh8UHtrgmkv4vLevP3ATVpsAVQs+PBk11qfsHJ3DuYS/iXNwIaNtlSSA3Xh
 g8bIeNKOA0dDBz1izoGt3VXYbMMu+EexKLFoXCZxHvIlohT/7ba3XypYpRKJVJ2Dhu1w
 20pw==
X-Gm-Message-State: AOAM530iTZ0aK4pvdxjOZ9hkADIjAO1duz//gESH8AlQuzC+6zY9iTvz
 JdKHNF9QfkV7hb+2V/YmEWjLX9jMKoe+q2CHtNG58F8TwsbyDg==
X-Google-Smtp-Source: ABdhPJzt8bmARXXZzq7CsKlQhHOJifs4QGoREDcKTzw/JXM7hszN79tQKC5C+9Ak6EHCrJYHuOw8XNuMrc9mt3XHGdU=
X-Received: by 2002:a17:902:523:: with SMTP id
 32mr15768338plf.176.1597777701586; 
 Tue, 18 Aug 2020 12:08:21 -0700 (PDT)
MIME-Version: 1.0
From: Hugo Buddelmeijer <hugo@HIDDEN>
Date: Tue, 18 Aug 2020 21:08:10 +0200
Message-ID: <CA+Jv8O20Yps0HjVws4gB6jeP7p-0Xs3dB7j9zX6b-n-n8e+w0g@HIDDEN>
Subject: conda 4.8.3 on guix cannot activate environments
To: bug-guix@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000554e5805ad2b9ccf"
Received-SPF: pass client-ip=209.85.214.180; envelope-from=blackshift@HIDDEN;
 helo=mail-pl1-f180.google.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/18 15:08:22
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: 1
X-Spam_score: 0.1
X-Spam_bar: /
X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=1,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 18 Aug 2020 15:24:29 -0400
Cc: Ricardo Wurmus <rekado@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

--000000000000554e5805ad2b9ccf
Content-Type: text/plain; charset="UTF-8"

Dear Ricardo et al.,

The conda 4.8.3 package on guix does not seem to work as expected.

Conda info:

hugo@alex ~$ which conda
/home/hugo/.guix-profile/bin/conda
hugo@alex ~$ realpath $(which conda)
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda
hugo@alex ~$ conda -V
conda 4.8.3


Creating an environment works fine:

hugo@alex ~$ conda create -n testenv -y
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/hugo/.conda/envs/testenv

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate testenv
#
# To deactivate an active environment, use
#
#     $ conda deactivate


But activating it does not work properly:

hugo@alex ~$ conda activate testenv

CommandNotFoundError: Your shell has not been properly configured to use
'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running
'conda init'.


Unfortunately, conda init does not work well, because it needs root access:

hugo@alex ~$ conda init bash --dry-run
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/condabin/conda
modified
 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda
modified
 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda-env
modified
 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/activate
modified
 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/deactivate
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/conda.sh
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/fish/conf.d/conda.fish
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/shell/condabin/Conda.psm1
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/shell/condabin/conda-hook.ps1
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/lib/python3.8/site-packages/xontrib/conda.xsh
no change
/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/conda.csh
modified      /home/hugo/.bashrc

==> For changes to take effect, close and re-open your current shell. <==


The last change of the conda package seems to be 638ef1e81d8 from August 13.

This is my first week with guix, so I'm not even sure where to begin to
debug this.

FWIW, maybe it would be simpler to create a micromamba package than a conda
package:
https://github.com/TheSnakePit/mamba

Cheers,
Hugo

--000000000000554e5805ad2b9ccf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Dear Ricardo et al.,<br></div><div><br></div><div>The=
 conda 4.8.3 package on guix does not seem to work as expected.</div><div><=
br></div><div>Conda info:</div><div><br></div><div>hugo@alex ~$ which conda=
<br>/home/hugo/.guix-profile/bin/conda<br>hugo@alex ~$ realpath $(which con=
da)<br>/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda<br=
>hugo@alex ~$ conda -V<br>conda 4.8.3</div><div><br></div><div><br></div><d=
iv>Creating an environment works fine:</div><div><br></div><div>hugo@alex ~=
$ conda create -n testenv -y<br>Collecting package metadata (current_repoda=
ta.json): done<br>Solving environment: done<br><br>## Package Plan ##<br><b=
r>=C2=A0 environment location: /home/hugo/.conda/envs/testenv<br><br>Prepar=
ing transaction: done<br>Verifying transaction: done<br>Executing transacti=
on: done<br>#<br># To activate this environment, use<br>#<br># =C2=A0 =C2=
=A0 $ conda activate testenv<br>#<br># To deactivate an active environment,=
 use<br>#<br># =C2=A0 =C2=A0 $ conda deactivate</div><div><br></div><div><b=
r></div><div>But activating it does not work properly:<br></div><div><br></=
div><div>hugo@alex ~$ conda activate testenv<br><br>CommandNotFoundError: Y=
our shell has not been properly configured to use &#39;conda activate&#39;.=
<br>To initialize your shell, run<br><br>=C2=A0 =C2=A0 $ conda init &lt;SHE=
LL_NAME&gt;<br><br>Currently supported shells are:<br>=C2=A0 - bash<br>=C2=
=A0 - fish<br>=C2=A0 - tcsh<br>=C2=A0 - xonsh<br>=C2=A0 - zsh<br>=C2=A0 - p=
owershell<br><br>See &#39;conda init --help&#39; for more information and o=
ptions.<br><br>IMPORTANT: You may need to close and restart your shell afte=
r running &#39;conda init&#39;.</div><div><br></div><div><br></div><div>Unf=
ortunately, conda init does not work well, because it needs root access:</d=
iv><div><br></div><div>hugo@alex ~$ conda init bash --dry-run<br>no change =
=C2=A0 =C2=A0 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/conda=
bin/conda<br>modified =C2=A0 =C2=A0 =C2=A0/gnu/store/ihn8dbs84rmc3ai7r1vkvh=
4cya518wmx-conda-4.8.3/bin/conda<br>modified =C2=A0 =C2=A0 =C2=A0/gnu/store=
/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bin/conda-env<br>modified =C2=
=A0 =C2=A0 =C2=A0/gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/bi=
n/activate<br>modified =C2=A0 =C2=A0 =C2=A0/gnu/store/ihn8dbs84rmc3ai7r1vkv=
h4cya518wmx-conda-4.8.3/bin/deactivate<br>no change =C2=A0 =C2=A0 /gnu/stor=
e/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/etc/profile.d/conda.sh<br>no=
 change =C2=A0 =C2=A0 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8=
.3/etc/fish/conf.d/conda.fish<br>no change =C2=A0 =C2=A0 /gnu/store/ihn8dbs=
84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/shell/condabin/Conda.psm1<br>no chang=
e =C2=A0 =C2=A0 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wmx-conda-4.8.3/she=
ll/condabin/conda-hook.ps1<br>no change =C2=A0 =C2=A0 /gnu/store/ihn8dbs84r=
mc3ai7r1vkvh4cya518wmx-conda-4.8.3/lib/python3.8/site-packages/xontrib/cond=
a.xsh<br>no change =C2=A0 =C2=A0 /gnu/store/ihn8dbs84rmc3ai7r1vkvh4cya518wm=
x-conda-4.8.3/etc/profile.d/conda.csh<br>modified =C2=A0 =C2=A0 =C2=A0/home=
/hugo/.bashrc<br><br>=3D=3D&gt; For changes to take effect, close and re-op=
en your current shell. &lt;=3D=3D<br><br><br></div><div>The last change of =
the conda package seems to be 638ef1e81d8 from August 13.</div><div><br></d=
iv><div>This is my first week with guix, so I&#39;m not even sure where to =
begin to debug this.<br></div><div><br></div><div>FWIW, maybe it would be s=
impler to create a micromamba package than a conda package:<br></div><div><=
a href=3D"https://github.com/TheSnakePit/mamba">https://github.com/TheSnake=
Pit/mamba</a></div><div><br></div><div>Cheers,</div><div>Hugo</div><div><br=
></div></div>

--000000000000554e5805ad2b9ccf--




Acknowledgement sent to Hugo Buddelmeijer <hugo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#42920; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 25 Aug 2020 15:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.