Mac installation issues

I am installing AFNI on a new Macbook Pro (M4 Pro chip). I followed the instructions here: 1.1.8. macOS 12+ (Apple Silicon/ARM processor/chip: M1, M2, …) — AFNI, SUMA and FATCAT: v25.2.08

No errors along the way, rebooted, and finished out the last commands. However, when I open a new shell and type afni, I get the dreaded reply:

zsh: command not found: afni

(I get the same error if I load a new terminal in tcsh)

I confirmed that have an abin directory in my /Users/ directory.

my zshrc is as follows:

export PATH=${PATH}:/opt/homebrew/opt/python/libexec/bin

# -------------------------------------------------------
# for AFNI: auto-inserted by init_user_dotfiles.py

# add AFNI abin to PATH
export PATH=${PATH}:/Users/m699a262/abin

# set up tab completion for AFNI programs
if [ -f $HOME/.afni/help/all_progs.COMP.zsh ]
then
   autoload -U +X bashcompinit && bashcompinit
   autoload -U +X compinit && compinit -i \
     && source $HOME/.afni/help/all_progs.COMP.zsh
fi
# -------------------------------------------------------


# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/m699a262/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/m699a262/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/m699a262/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/m699a262/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

When I run afni_system_check.py -check-all, I get a bunch of errors because it cannot find the afni program. See below

I am sure there is something I am missing here, so I would appreciate any help you can provide.

Thanks!

export PATH=${PATH}:/opt/homebrew/opt/python/libexec/bin

# -------------------------------------------------------
# for AFNI: auto-inserted by init_user_dotfiles.py

# add AFNI abin to PATH
export PATH=${PATH}:/Users/m699a262/abin

# set up tab completion for AFNI programs
if [ -f $HOME/.afni/help/all_progs.COMP.zsh ]
then
   autoload -U +X bashcompinit && bashcompinit
   autoload -U +X compinit && compinit -i \
     && source $HOME/.afni/help/all_progs.COMP.zsh
fi
# -------------------------------------------------------


# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/m699a262/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/m699a262/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/m699a262/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/m699a262/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

Here is the output of afni_system_check.py

-------------------------------- general ---------------------------------
architecture:         64bit Mach-O
cpu type:             arm64
system:               Darwin
release:              24.6.0
version:              Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041
distribution:         15.6
number of CPUs:       14
user:                 m699a262
apparent login shell: zsh
shell RC file:        .zshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           :
                     : 
AFNI_version.txt     : AFNI_25.2.08, anyos_text_atlas, Aug 15 2025, local
which python         : /Users/m699a262/miniconda3/bin/python
python version       : 3.13.5
which R              : /usr/local/bin/R
R version            : R version 4.3.1 (aarch64-apple-darwin20)

instances of various programs found in PATH:
    afni    : 0 
    R       : 1   (/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/bin/R)
    python  : 2 
      /Users/m699a262/miniconda3/bin/python3.13
      /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/bin/python3.13
    python2 : 0 
    python3 : 3 
      /Users/m699a262/miniconda3/bin/python3.13
      /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/bin/python3.13
      /usr/bin/python3

testing ability to start various programs...
    afni                 : FAILURE
        /bin/sh: afni: command not found
    suma                 : FAILURE
        /bin/sh: suma: command not found
    3dSkullStrip         : FAILURE
        /bin/sh: 3dSkullStrip: command not found
    3dAllineate          : FAILURE
        /bin/sh: 3dAllineate: command not found
    3dRSFC               : FAILURE
        /bin/sh: 3dRSFC: command not found
    SurfMesh             : FAILURE
        /bin/sh: SurfMesh: command not found
    3dClustSim           : FAILURE
        /bin/sh: 3dClustSim: command not found
    build_afni.py        : success
    uber_subject.py      : success
    3dMVM                : FAILURE
        Error in library(data.table) : there is no package called ‘data.table’
        Calls: source ... suppressPackageStartupMessages -> withCallingHandlers -> library
        Execution halted
    rPkgsInstall         : FAILURE
        

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh           : /bin/tcsh
tcsh version         : 6.21.00
which Xvfb           : /opt/X11/bin/Xvfb

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        

R RHOME : /Library/Frameworks/R.framework/Resources

------------------------------ python libs -------------------------------

** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is required

** failed to load module flask
-- flask is not required, but is desirable

** failed to load module flask_cors
-- flask_cors is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH                       = /Users/m699a262/miniconda3/bin:/Users/m699a262/miniconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/opt/homebrew/opt/python/libexec/bin:/Users/m699a262/abin

PYTHONPATH                 = 
R_LIBS                     = 
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH (sub-shell) = 
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = 
CONDA_SHLVL                = 1
CONDA_DEFAULT_ENV          = base
CC                         = 
HOMEBREW_PREFIX            = /opt/homebrew

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

    .afnirc                   : found
    .sumarc                   : missing
    .afni/help/all_progs.COMP : missing

--------- shell startup files ----------

   -- good: .tcshrc seems to contain 'source .cshrc'
   -- considered operations: path, apsearch
   
   -- note: followers should not need edits, so edit flags should be 0
      (have 1 follower(s), which can be ignored)
   
   no modifications needed across 3 dot files
   
------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas    : did not find TT_N27+tlrc

------------------------------ OS specific -------------------------------
XQuartz version      : 2.8.5

which brew           : /opt/homebrew/bin/brew
brew version         : Homebrew 4.6.4

which git            : /usr/bin/git
git version          : git version 2.39.5 (Apple Git-154)
which gcc            : /usr/bin/gcc
gcc version          : Apple clang version 17.0.0 (clang-1700.0.13.5)

brew gcc(s)          : /opt/homebrew/bin/gcc-15
CommandLineTools SDK : MacOSX15.5.sdk

=========================  summary, please fix:  =========================
*  just be aware: login shell 'zsh', but our code examples use 'tcsh'
*  missing program: afni
*  failure under initial "AFNI and related program tests"
*  AFNI programs show FAILURE
*  missing R packages (see rPkgsInstall)
*  python library matplotlib is required
   (see AFNI install docs for details)
*  please run: "suma -update_env" for .sumarc
*  please run: apsearch -update_all_afni_help
*  insufficient data for AFNI bootcamp
   (see "Prepare for Bootcamp" on install pages)
*  possibly missing atlases

Oops... I realized I missed the final step before the conda setup. All good now!

Great, thanks for the update.

-rick