Skip to content

Commit 93c086b

Browse files
authored
Merge pull request #1234 from LourensVeen/issue_1183_detect_conda_base_env
Check for conda base env and refuse to install into it
2 parents 202161f + 3c05147 commit 93c086b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

support/setup/environment.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ detect_environments() {
3030
fi
3131

3232
if [ "a${CONDA_DEFAULT_ENV}" != "a" ] ; then
33-
ENV_TYPE="conda"
34-
ENV_NAME="${CONDA_DEFAULT_ENV}"
33+
if [ "a${CONDA_DEFAULT_ENV}" != "abase" ] ; then
34+
ENV_TYPE="conda"
35+
ENV_NAME="${CONDA_DEFAULT_ENV}"
36+
fi
3537
fi
3638
}
3739

support/setup/help.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ print_environment_step() {
104104
105105
To install any packages, you need to create and activate a Conda environment
106106
or a Python virtualenv. If you have an environment into which you'd like to
107-
install AMUSE, you should activate it now. To create a new Conda environment,
108-
use
107+
install AMUSE, then you should activate it now.
108+
109+
To create a new Conda environment, use
109110
110111
conda create --channel conda-forge --override-channels -n Amuse-env
111112
@@ -115,6 +116,10 @@ Then you activate it using
115116
116117
You can name the environment anything you like instead of my-amuse-env.
117118
119+
Note that installing packages other than conda itself in the (base) environment
120+
is not supported by conda, and this installer will refuse to do so. Please make
121+
a specific conda environment for your project as described above.
122+
118123
To create a Python virtualenv, use
119124
120125
python3 -m venv venv

0 commit comments

Comments
 (0)