From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Frederick Muriithi <fredmanglis@gmail.com>
Cc: 27858-done@debbugs.gnu.org
Subject: bug#27858: Conda (on guix) does not activate environments
Date: Mon, 01 Feb 2021 14:37:13 -0500 [thread overview]
Message-ID: <87r1lzr34m.fsf@gmail.com> (raw)
In-Reply-To: <CALjrZwb16Cn1ygFYUhKDWdid1dYQabB6yB0p_eFu8YYf_00pOQ@mail.gmail.com> (Frederick Muriithi's message of "Fri, 28 Jul 2017 12:42:58 +0300")
Hello,
Frederick Muriithi <fredmanglis@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
next prev parent reply other threads:[~2021-02-01 19:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 5:49 bug#27858: Conda (on guix) does not activate environments Frederick Muriithi
2017-07-28 9:36 ` Pjotr Prins
2017-07-28 9:42 ` Frederick Muriithi
2021-02-01 19:37 ` Maxim Cournoyer [this message]
2017-07-28 10:20 ` Frederick Muriithi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1lzr34m.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=27858-done@debbugs.gnu.org \
--cc=fredmanglis@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).