GNU bug report logs - #27858
Conda (on guix) does not activate environments

Previous Next

Package: guix;

Reported by: Frederick Muriithi <fredmanglis <at> gmail.com>

Date: Fri, 28 Jul 2017 05:51:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27858 in the body.
You can then email your comments to 27858 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#27858; Package guix. (Fri, 28 Jul 2017 05:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frederick Muriithi <fredmanglis <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 28 Jul 2017 05:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Frederick Muriithi <fredmanglis <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Conda (on guix) does not activate environments
Date: Fri, 28 Jul 2017 08:49:26 +0300
I have come across a bug on conda, installed via guix, that does not
seem to be present when conda is installed via the process at
https://conda.io/docs/install/quick.html#linux-miniconda-install

The issue
---------
Conda (on guix) does not activate environments

Command ran
-----------
source activate test-env

Expected result
---------------
The envinment should be activated, and the prompt changes from
`frederick <at> localhost:/tmp$` to `(test-guix-conda)
frederick <at> localhost:/tmp$`

Actual result
-------------
The terminal window is exited.

Additional information
----------------------
This behaviour is not present on conda installed via the process
presented in the conda documentation.

The environment(s) created by conda on guix are available on, and can
be activated by conda installed via the process in the conda
documentation.

I ran `bash -c "source activate test-env"` and the following error
message was displayed:

/gnu/store/f2dr9xbimg93pljm7xgmqb4cm5bxy98r-conda-4.3.16/bin/.deactivate-real:
line 59: return: can only `return' from a function or sourced script
/gnu/store/f2dr9xbimg93pljm7xgmqb4cm5bxy98r-conda-4.3.16/bin/.deactivate-real:
line 94: return: can only `return' from a function or sourced script

I would appreciate any help that would help in resolving this issue.




Information forwarded to bug-guix <at> gnu.org:
bug#27858; Package guix. (Fri, 28 Jul 2017 09:38:01 GMT) Full text and rfc822 format available.

Message #8 received at 27858 <at> debbugs.gnu.org (full text, mbox):

From: Pjotr Prins <pjotr.public12 <at> thebird.nl>
To: Frederick Muriithi <fredmanglis <at> gmail.com>
Cc: 27858 <at> debbugs.gnu.org
Subject: Re: bug#27858: Conda (on guix) does not activate environments
Date: Fri, 28 Jul 2017 11:36:42 +0200
Hi Fred,

Can you send the exact commands you are using so we can replicate the
issue?

Pj.

-- 




Information forwarded to bug-guix <at> gnu.org:
bug#27858; Package guix. (Fri, 28 Jul 2017 09:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 27858 <at> debbugs.gnu.org (full text, mbox):

From: Frederick Muriithi <fredmanglis <at> gmail.com>
To: Pjotr Prins <pjotr.public12 <at> thebird.nl>
Cc: 27858 <at> debbugs.gnu.org
Subject: Re: bug#27858: Conda (on guix) does not activate environments
Date: Fri, 28 Jul 2017 12:42:58 +0300
1) Install conda into a profile:

    guix package --install=conda --profile=$HOME/guix_profiles/conda

2) Activate the profile:

    source $HOME/guix_profiles/conda/etc/profile

3) Create an environment with conda and install biopython

    conda create --name test-env biopython

4) Try to activate the environment (here's where it fails)

    source activate test-env




Information forwarded to bug-guix <at> gnu.org:
bug#27858; Package guix. (Fri, 28 Jul 2017 10:22:02 GMT) Full text and rfc822 format available.

Message #14 received at 27858 <at> debbugs.gnu.org (full text, mbox):

From: Frederick Muriithi <fredmanglis <at> gmail.com>
To: Pjotr Prins <pjotr.public12 <at> thebird.nl>
Cc: 27858 <at> debbugs.gnu.org
Subject: Re: bug#27858: Conda (on guix) does not activate environments
Date: Fri, 28 Jul 2017 13:20:50 +0300
Additional Information

When installed from conda's documentation, conda installs the
following packages into conda's root environment by default:

asn1crypto, cffi, conda, conda-env, cryptography, idna, libffi,
openssl, packaging, pip, pycosat, pycparser, pyopenssl, pyparsing,
python, readline, requests, ruamel_yaml, setuptools, six, sqlite, tk,
wheel, xz, yaml, zlib


These do not exists in the root environment of the conda installed via guix.




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 01 Feb 2021 19:38:01 GMT) Full text and rfc822 format available.

Notification sent to Frederick Muriithi <fredmanglis <at> gmail.com>:
bug acknowledged by developer. (Mon, 01 Feb 2021 19:38:02 GMT) Full text and rfc822 format available.

Message #19 received at 27858-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Frederick Muriithi <fredmanglis <at> gmail.com>
Cc: Pjotr Prins <pjotr.public12 <at> thebird.nl>, 27858-done <at> debbugs.gnu.org
Subject: Re: bug#27858: Conda (on guix) does not activate environments
Date: Mon, 01 Feb 2021 14:37:13 -0500
Hello,

Frederick Muriithi <fredmanglis <at> gmail.com> writes:

> 1) Install conda into a profile:
>
>     guix package --install=conda --profile=$HOME/guix_profiles/conda
>
> 2) Activate the profile:
>
>     source $HOME/guix_profiles/conda/etc/profile
>
> 3) Create an environment with conda and install biopython
>
>     conda create --name test-env biopython
>
> 4) Try to activate the environment (here's where it fails)
>
>     source activate test-env

I had never used conda before, so I was a bit surprised that it sneeked
that into my ~/.bashrc:

diff --git a/bash/.bashrc b/bash/.bashrc
index d0635bc..169b2c8 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -119,3 +119,19 @@ function up()
     cd "$dir"
     echo "info: now in $PWD [Git repo]"
 }
+
+# >>> conda initialize >>>
+# !! Contents within this block are managed by 'conda init' !!
+__conda_setup="$('/gnu/store/pjkxdaryj97yffhjxql2q4wpzs70hpa3-conda-4.8.3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
+if [ $? -eq 0 ]; then
+    eval "$__conda_setup"
+else
+    if [ -f "/gnu/store/pjkxdaryj97yffhjxql2q4wpzs70hpa3-conda-4.8.3/etc/profile.d/conda.sh" ]; then
+        . "/gnu/store/pjkxdaryj97yffhjxql2q4wpzs70hpa3-conda-4.8.3/etc/profile.d/conda.sh"
+    else
+        export PATH="/gnu/store/pjkxdaryj97yffhjxql2q4wpzs70hpa3-conda-4.8.3/bin:$PATH"
+    fi
+fi
+unset __conda_setup
+# <<< conda initialize <<<
+

and required the presence of the 'sudo' command to be happy.

With that said,

$ guix environment --pure --ad-hoc conda bash coreutils sudo

(base) $ conda create --name test-env biopython

Then the suggested:

(base) $ conda activate test-env

(test-env) $

So, it seems to work.

Closing.

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Mar 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 55 days ago.

Previous Next


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