From 7b55c7e3e075592d6e9cd5dda4a2114354d4541a Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Thu, 12 Mar 2026 16:46:15 +0100 Subject: [PATCH] Check for conda base env and refuse to install into it --- support/setup/environment.sh | 6 ++++-- support/setup/help.sh | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/support/setup/environment.sh b/support/setup/environment.sh index 3646e97eb6..6606b33811 100644 --- a/support/setup/environment.sh +++ b/support/setup/environment.sh @@ -30,8 +30,10 @@ detect_environments() { fi if [ "a${CONDA_DEFAULT_ENV}" != "a" ] ; then - ENV_TYPE="conda" - ENV_NAME="${CONDA_DEFAULT_ENV}" + if [ "a${CONDA_DEFAULT_ENV}" != "abase" ] ; then + ENV_TYPE="conda" + ENV_NAME="${CONDA_DEFAULT_ENV}" + fi fi } diff --git a/support/setup/help.sh b/support/setup/help.sh index a8a5bfc1f1..eb570b1587 100644 --- a/support/setup/help.sh +++ b/support/setup/help.sh @@ -104,8 +104,9 @@ print_environment_step() { To install any packages, you need to create and activate a Conda environment or a Python virtualenv. If you have an environment into which you'd like to -install AMUSE, you should activate it now. To create a new Conda environment, -use +install AMUSE, then you should activate it now. + +To create a new Conda environment, use conda create --channel conda-forge --override-channels -n Amuse-env @@ -115,6 +116,10 @@ Then you activate it using You can name the environment anything you like instead of my-amuse-env. +Note that installing packages other than conda itself in the (base) environment +is not supported by conda, and this installer will refuse to do so. Please make +a specific conda environment for your project as described above. + To create a Python virtualenv, use python3 -m venv venv