This might be a bug of the recent anaconda. What works for me:
step1: vim /anaconda/bin/activate
, it shows:
#!/bin/sh
_CONDA_ROOT="/anaconda"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
\. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
conda activate "$@"
step2: comment out the last line: # conda activate "$@"