Hello pt,
So here are my answers to your questions
- When I type conda env list, the terminal shows that I have python 2.7 activated.
- The reason I showed you the afni_sytem_check results produced in bash, not tcsh (my preferred shell) is that I wanted to let you do a side-by-side comparison of failed and successful results obtained from the same shell. This, because I never had a successful run of the afni_system_check under the tcsh.
And here is what I’ve discovered:
- When I delete the following lines from the .cshrc file, conda no longer works in tcsh, but the afni_system_check again starts to run successfully in bash
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if ( -f "/Users/achoe2/miniconda3/etc/profile.d/conda.csh" ) then
source "/Users/achoe2/miniconda3/etc/profile.d/conda.csh"
else
setenv PATH "/Users/achoe2/miniconda3/bin:$PATH"
endif
# <<< conda initialize <<<
And here is the /Users/achoe2/miniconda3/etc/profile.d/conda.csh
setenv CONDA_EXE "/Users/achoe2/miniconda3/bin/conda"
setenv _CONDA_ROOT "/Users/achoe2/miniconda3"
setenv _CONDA_EXE "/Users/achoe2/miniconda3/bin/conda"
setenv CONDA_PYTHON_EXE "/Users/achoe2/miniconda3/bin/python"
echo "Copyright (C) 2012 Anaconda, Inc" > /dev/null
echo "SPDX-License-Identifier: BSD-3-Clause" > /dev/null
if (! $?_CONDA_EXE) then
set _CONDA_EXE="${PWD}/conda/shell/bin/conda"
else
if ("$_CONDA_EXE" == "") then
set _CONDA_EXE="${PWD}/conda/shell/bin/conda"
endif
endif
if ("`alias conda`" == "") then
if ($?_CONDA_EXE) then
# _CONDA_PFX is named so as not to cause confusion with CONDA_PREFIX
# If nested backticks were possible we wouldn't use any variables here.
set _CONDA_PFX=`dirname "${_CONDA_EXE}"`
set _CONDA_PFX=`dirname "${_CONDA_PFX}"`
alias conda source "${_CONDA_PFX}/etc/profile.d/conda.csh"
# And for good measure, get rid of it afterwards.
unset _CONDA_PFX
else
alias conda source "${PWD}/conda/shell/etc/profile.d/conda.csh"
endif
setenv CONDA_SHLVL 0
if (! $?prompt) then
set prompt=""
endif
else
setenv PATH "`dirname ${_CONDA_EXE}`:$PATH"
switch ( "${1}" )
case "activate":
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh activate '${2}' ${argv[3-]})`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
case "deactivate":
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh deactivate '${2}' ${argv[3-]})`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
case "install" | "update" | "upgrade" | "remove" | "uninstall":
$_CONDA_EXE $argv[1-]
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh reactivate)`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
default:
$_CONDA_EXE $argv[1-]
breaksw
endsw
endif
So if this bit of code (conda.csh) is run on the tcsh shell, while the conda can now run(?) in tcsh, the conda no longer responds to the ‘conda activate py27_afni_tiny’ command. In fact, once the conda.csh is run, no matter which environment I activate, the ‘which python’ returns the same path (i.e., /Users/achoe2/miniconda3/bin/python). Prior to running conda.csh, if I activate the py27_afni_tiny, and ask ‘which python’, the path is correctly set for /Users/achoe2/miniconda3/envs/py27_afni_tiny/bin/python.
It pretty clear to me that something wicked is happening with conda.csh, but I don’t know how to fix it.
Wheeeeee (used in the same context as your previous wheee).
Thank you,
Ann