AFNI bootcamp installation issues

Hello to those more knowledgable than I,

I am attempting to install the ANFI program for the bootcamp being hosted from May 28-30, and I have reached the point of looking at errors. This is currently what I have as my output and what I need to fix

-------------------------------- general ---------------------------------
architecture:         64bit Mach-O
cpu type:             arm64
system:               Darwin
release:              24.5.0
version:              Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:26 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8112
distribution:         15.5
number of CPUs:       8
user:                 romanbecker
apparent login shell: zsh
shell RC file:        .zshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /Users/romanbecker/abin/afni
afni version         : Precompiled binary macos_13_ARM: May 23 2025 
                     : AFNI_25.1.11 'Maximinus'
AFNI_version.txt     : AFNI_25.1.11, macos_13_ARM, May 23 2025, build
which python         : /opt/homebrew/opt/python/libexec/bin/python
python version       : 3.13.3
which R              : /usr/local/bin/R
R version            : R version 4.3.1 (aarch64-apple-darwin20)

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

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    build_afni.py        : success
    uber_subject.py      : success
    3dMVM                : success
    rPkgsInstall         : success

------------------------ 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
        
        oo Warning: 
           These packages are not installed on the computer: gamm4!
        

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/romanbecker/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/romanbecker/abin

PYTHONPATH                 = 
R_LIBS                     = /Users/romanbecker/sw/R-4.3.1
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH (sub-shell) = 
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = 
CONDA_SHLVL                = 0
CONDA_DEFAULT_ENV          = 
CC                         = 
HOMEBREW_PREFIX            = /opt/homebrew

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

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

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

--------- 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    : found TT_N27+tlrc  under /Users/romanbecker/abin

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

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

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 16.0.0 (clang-1600.0.26.6)

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

=========================  summary, please fix:  =========================
*  just be aware: login shell 'zsh', but our code examples use 'tcsh'
*  missing R packages (see rPkgsInstall)
*  python library matplotlib is required
   (see AFNI install docs for details)
*  insufficient data for AFNI bootcamp
   (see "Prepare for Bootcamp" on install pages)

From what I could tell, gamm4 is the only R package I still need, and my python library is "/opt/homebrew/opt/python/libexec/bin/python"

I am unsure of how to fix the three remaining issues that I am facing from the download, and any advice that can be provided on this situation would be greatly appreciated!

Also, I should have clarified this in the post, but I am using Sequoia 15.5 as my OS on a MAC with an M2 chip.

Howdy-

Given that "gamm4" is the only thing missing there, could you please try the following:

  • Start R with typing this:
      R
    
  • Try installing the missing package explicitly, within that R environment:
    install.packages("gamm4")
    

Does that resolve the system check issue?

For Python, as noted here it often seems most useful to manage Python packages on macOS with Miniconda or something similar. Our setup instructions to help with that are here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/miniconda.html#set-up-conda-quick

--pt

Thank you so much for providing this response! When I ran this command, I was met with the following message:

 **Installing package into ‘/Users/romanbecker/sw/R-4.3.1’**
 
 **(as ‘lib’ is unspecified)**
 
 **Warning message:**
 
 **package ‘gamm4’ is not available for this version of R**
 
**A version of this package for your version of R might be available elsewhere,**

 **see the ideas at**

 **https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages**

For my CRAN mirror, I selected USA(MO) [HTTPS]

It looks like that package will no longer work with the 4.3.1 version from the instructions, so we will have to update those. I expect that if you update R and then update your binaries (build_afni.py -build_root ~/afni_build), it will probably work.

But on the other hand, gamm4 seems to only be needed for 3dMSS, so it is not so important to resolve before tomorrow's bootcamp. It is more important to set up the little miniconda environment for matplotlib and flask_cors.

-rick

Thank you both so truly much for your kindness and assistance in this matter, I truly cannot thank you enough! The miniconda environment for matplotlib and flask_cors has been installed, and I am now downloading the demo data for the bootcamp starting tomorrow.