Skip to content

Commit 1f420bb

Browse files
committed
WIP: try using conda.sh to init conda
1 parent dc1aa1a commit 1f420bb

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

env.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,13 @@
44
MGENVDIR=$(dirname "${BASH_SOURCE[0]}")
55

66
# setup environment variables
7+
# Note: this also adds "$INSTALLDIR/conda/bin" to $PATH
78
echo "[mgenv] setting environmental variables"
89
source ${MGENVDIR}/variables.sh
910

10-
# initialize conda
11-
echo "[mgenv] initializing conda"
12-
conda init bash
13-
14-
# reload shell
15-
echo "[mgenv] reloading shell"
16-
source $HOME/.bashrc
17-
18-
# list conda environments
19-
echo "[mgenv] listing conda environments"
20-
conda env list
21-
22-
# initialize conda
23-
echo "[mgenv] initializing conda (again)"
24-
conda init bash
11+
# activate conda
12+
echo "[mgenv] activating conda"
13+
source "$INSTALLDIR/conda/etc/profile.d/conda.sh"
2514

2615
# activate conda environment
2716
echo "[mgenv] activating environment $CONDANAME"

0 commit comments

Comments
 (0)