ss_review_driver error "Command not found"

AFNI version info (afni -ver): Precompiled binary linux_ubuntu_16_64: May 23 2025 (Version AFNI_25.1.11 'Maximinus')

Hi, extreme AFNI beginner here having an issue when I try to run ss_review_driver. I'm not sure what caused this, as it used to function correctly, but most of the output is "command not found." I am also having a similar issue while running my preprocessing script, specifically giving me "WARNING: couldn't load modules. Entering generic environment. @global_parse: Command not found" as well which causes the preprocessing to fail.

Any help is appreciated, thanks!

./\@ss_review_driver
WARNING: couldn't load modules.  Entering generic environment.
------------------- @ss_review_basic --------------------

subject ID                : sub-13985_ses-pre_task-VAC
AFNI version              : AFNI_24.3.03
AFNI package              : linux_ubuntu_16_64
TR                        : 1.0
TRs removed (per run)     : 3
multiband level           : 1
slice timing pattern      : simult
num stim classes provided : 3
final anatomy dset        : anat_final.sub-13985_ses-pre_task-VAC+tlrc.HEAD
final stats dset          : stats.sub-13985_ses-pre_task-VAC_REML+tlrc.HEAD
3dinfo: Command not found.
orig voxel counts         : 
3dinfo: Command not found.
orig voxel resolution     : 
3dinfo: Command not found.
orig volume center        : 
3dinfo: Command not found.
final voxel resolution    : 

motion limit              : 0.3
1deval: Command not found.
num TRs above mot limit   : 0
average motion (per TR)   : 3dTstat: Command not found.
1deval: Command not found.
average censored motion   : 3dTstat: Command not found.
1d_tool.py: Command not found.
max motion displacement   : 
1d_tool.py: Command not found.
max censored displacement : 
outlier limit             : 0.05
average outlier frac (TR) : 3dTstat: Command not found.
1deval: Command not found.
num TRs above out limit   : 0
flip guess                : NO_FLIP

1d_tool.py: Command not found.
1d_tool.py: Command not found.
num runs found            : 
num TRs per run           : 
1d_tool.py: Command not found.
1d_tool.py: Command not found.
1d_tool.py: Command not found.
num TRs per run (applied) : 
num TRs per run (censored): 
fraction censored per run : 
1d_tool.py: Command not found.
rows_cols: Subscript out of range.
---------------------------------------------------------
prompt_user: Command not found.

------------------- outliers and motion --------------------
[1] 3678713
1dplot: Command not found.
[2] 3678714
1dplot: Command not found.
[1]    Exit 1                        1dplot -sepscl -volreg -ynames enorm outliers - -wintitle mot params, enorm, outliers dfile_rall.1D motion_sub-13985_ses-pre_task-VAC_enorm.1D outcount_rall.1D
[1]    Exit 1dplot: Command not found.

Howdy-

Could you please run the system check:

afni_system_check.py -check_all

... and copy+paste the output here? This will help us check the setup, resources and dependencies on that system:

thanks,
pt

And to be sure, are you possibly on an HPC system and need to "module load afni" or something?

In any case, it looks like AFNI is not in your path. If it should be in ~/abin, you might need to answer Paul's question with something like:

~/abin/afni_system_check.py -check_all

-rick

Thank you both for your responses! Below is the output of the system check:

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              5.15.0-173-generic
version:              #183~20.04.1-Ubuntu SMP Fri Mar 13 14:51:03 UTC 2026
distribution:         ubuntu 20.04 focal
number of CPUs:       128
user:                 old0004
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /scratch/scampi_analysis_directory/tools/afni/abin/afni
afni version         : Precompiled binary linux_ubuntu_16_64: May 23 2025 
                     : AFNI_25.1.11 'Maximinus'
AFNI_version.txt     : AFNI_25.1.11, linux_ubuntu_16_64, May 23 2025, official
which python         : /usr/bin/python
python version       : 3.8.10
which R              : /usr/bin/R
R version            : R version 4.4.3 (x86_64-pc-linux-gnu)

instances of various programs found in PATH:
    afni    : 1   (/scratch/scampi_analysis_directory/tools/afni/abin/afni)
                  (not owned by user)
    R       : 1   (/usr/bin/R)
    python  : 2 
      /usr/bin/python3.8
      /linux_apps/python-v3.12/bin/python3
    python2 : 1   (/usr/bin/python2.7)
    python3 : 2 
      /usr/bin/python3.8
      /linux_apps/python-v3.12/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           : /usr/bin/tcsh
tcsh version         : 6.21.00
which Xvfb           : /usr/bin/Xvfb

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

R RHOME : /usr/lib/R

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

++ module loaded: matplotlib.pyplot
   module file : /usr/local/lib/python3.8/dist-packages/matplotlib/pyplot.py
   matplotlib version : 3.7.1

++ module loaded: flask
   module file : /usr/lib/python3/dist-packages/flask/__init__.py
   flask version : 1.1.1

++ module loaded: flask_cors
   module file : /usr/lib/python3/dist-packages/flask_cors/__init__.py
   flask_cors version : 3.0.8

-------------------------------- env vars --------------------------------
PATH                       = /usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/freesurfer/tktools:/usr/local/fsl/bin:/usr/local/freesurfer/mni/bin:/usr/local/ANTs/bin/:/usr/local/ANTs/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/linux_apps/bin:/scratch/scampi_analysis_directory/tools/afni/abin:/linux_apps/bin:/scratch/scampi_analysis_directory/tools/afni/abin:/scratch/scampi_analysis_directory/tools/afni/abin:/scratch/scampi_analysis_directory/tools/ANTs/bin:/scratch/scampi_analysis_directory/tools/c3d-1.1/bin:/scratch/scampi_analysis_directory/tools/ICA-AROMA-master

PYTHONPATH                 = /scratch/scampi_analysis_directory/tools/py3.8-site-packages
R_LIBS                     = /scratch/scampi_analysis_directory/tools/R
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH          = 
DYLD_FALLBACK_LIBRARY_PATH = 
CONDA_SHLVL                = 
CONDA_DEFAULT_ENV          = 
CC                         = 
HOMEBREW_PREFIX            = 

----------------------------- 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)
   
   dot file test : want 1 modifications across 3 files:
   
      file             path  flatdir  apsearch        follower
      ---------------  ----  -------  --------        --------
      .cshrc           0     0        1               0     
      .tcshrc          0     0        0               1     
      .bashrc          0     0        0               0     
   
------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME (163840M Avail)
           top history: ...d GroupAna_cases/gen_datatables/ggc_dt_commands.tcsh
data dir : found AFNI_demos   under $HOME
           top history: 22 May 2025 [taylorp]: update subject QC directories
data dir : found suma_demo    under $HOME
           top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas    : did not find TT_N27+tlrc

------------------------------ OS specific -------------------------------
which apt-get        : /usr/bin/apt-get
apt-get version      : apt 2.0.10 (amd64)

which git            : /usr/bin/git
git version          : git version 2.25.1
which gcc            : /usr/bin/gcc
gcc version          : gcc (Ubuntu 9.4.0-1ubuntu1~20.04.3) 9.4.0

have Ubuntu system: ubuntu 20.04 focal
have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: May 23 2025 

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  shell bash: consider sourcing (non-login) .bashrc from (login) .profile
*  dot file test : want 1 modifications across 3 files:
*  possibly missing atlases

I am not on an HCP system, but we do have AFNI set up on a shared directory. Other users (who supposedly have everything set up the same as I do) are able to run ss_review_driver without the "command not found" error. I went ahead and ran the system check in ~/abin as well, below.

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              5.15.0-173-generic
version:              #183~20.04.1-Ubuntu SMP Fri Mar 13 14:51:03 UTC 2026
distribution:         ubuntu 20.04 focal
number of CPUs:       128
user:                 old0004
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /scratch/scampi_analysis_directory/tools/afni/abin/afni
afni version         : Precompiled binary linux_ubuntu_16_64: May 23 2025 
                     : AFNI_25.1.11 'Maximinus'
AFNI_version.txt     : AFNI_25.1.11, linux_openmp_64, May 23 2025, official
which python         : /usr/bin/python
python version       : 3.8.10
which R              : /usr/bin/R
R version            : R version 4.4.3 (x86_64-pc-linux-gnu)

instances of various programs found in PATH:
    afni    : 1   (/scratch/scampi_analysis_directory/tools/afni/abin/afni)
                  (not owned by user)
    R       : 1   (/usr/bin/R)
    python  : 2 
      /usr/bin/python3.8
      /linux_apps/python-v3.12/bin/python3
    python2 : 1   (/usr/bin/python2.7)
    python3 : 2 
      /usr/bin/python3.8
      /linux_apps/python-v3.12/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

** missing 2 binary libraries in program R_io.so

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

which tcsh           : /usr/bin/tcsh
tcsh version         : 6.21.00
which Xvfb           : /usr/bin/Xvfb

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

R RHOME : /usr/lib/R

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

++ module loaded: matplotlib.pyplot
   module file : /usr/local/lib/python3.8/dist-packages/matplotlib/pyplot.py
   matplotlib version : 3.7.1

++ module loaded: flask
   module file : /usr/lib/python3/dist-packages/flask/__init__.py
   flask version : 1.1.1

++ module loaded: flask_cors
   module file : /usr/lib/python3/dist-packages/flask_cors/__init__.py
   flask_cors version : 3.0.8

-------------------------------- env vars --------------------------------
PATH                       = /usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/freesurfer/tktools:/usr/local/fsl/bin:/usr/local/freesurfer/mni/bin:/usr/local/ANTs/bin/:/usr/local/ANTs/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/linux_apps/bin:/scratch/scampi_analysis_directory/tools/afni/abin:/linux_apps/bin:/scratch/scampi_analysis_directory/tools/afni/abin:/scratch/scampi_analysis_directory/tools/afni/abin:/scratch/scampi_analysis_directory/tools/ANTs/bin:/scratch/scampi_analysis_directory/tools/c3d-1.1/bin:/scratch/scampi_analysis_directory/tools/ICA-AROMA-master

PYTHONPATH                 = /scratch/scampi_analysis_directory/tools/py3.8-site-packages
R_LIBS                     = /scratch/scampi_analysis_directory/tools/R
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH          = 
DYLD_FALLBACK_LIBRARY_PATH = 
CONDA_SHLVL                = 
CONDA_DEFAULT_ENV          = 
CC                         = 
HOMEBREW_PREFIX            = 

----------------------------- 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)
   
   dot file test : want 1 modifications across 3 files:
   
      file             path  flatdir  apsearch        follower
      ---------------  ----  -------  --------        --------
      .cshrc           0     0        1               0     
      .tcshrc          0     0        0               1     
      .bashrc          0     0        0               0     
   
------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME (163840M Avail)
           top history: ...d GroupAna_cases/gen_datatables/ggc_dt_commands.tcsh
data dir : found AFNI_demos   under $HOME
           top history: 22 May 2025 [taylorp]: update subject QC directories
data dir : found suma_demo    under $HOME
           top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas    : did not find TT_N27+tlrc

------------------------------ OS specific -------------------------------
which apt-get        : /usr/bin/apt-get
apt-get version      : apt 2.0.10 (amd64)

which git            : /usr/bin/git
git version          : git version 2.25.1
which gcc            : /usr/bin/gcc
gcc version          : gcc (Ubuntu 9.4.0-1ubuntu1~20.04.3) 9.4.0

have Ubuntu system: ubuntu 20.04 focal
have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: May 23 2025 

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  shell bash: consider sourcing (non-login) .bashrc from (login) .profile
*  missing binary library: libXp.so.6
*  missing binary library: libpng12.so.0
*  dot file test : want 1 modifications across 3 files:
*  possibly missing atlases

Given that your PATH directories start with /scratch, I wonder about how your dot files are configured, particularly given the warning about entering a generic environment. Note that @ss_review_driveris a tcsh script. So maybe your .cshrc/.tcshrc file is not configured correctly, and /scratch/scampi_analysis_directory/tools/afni/abin does not end up being in your PATH.

What is currently done to put it in your PATH under bash? Does .cshrc explicitly set PATH or is it just an append? If you would like to, please send me your dot files to review. I will send you a private message with details.

-rick

Hello,

Thanks for the files. There is some cleaning that could be done, but there are a couple of basic problems in the .cshrc file. One is that it tries (and fails) to load some module (which does not appear in your other files, so I expect it is unwanted anyway), and because of that, it intentionally wipes out the PATH (and gives the "Entering generic environment" warning). But then if it is not a login shell, it exits before finishing the rest of the file.

In any case, since csh/tcsh is not your login shell, it would be cleaner to have a very short .cshrc file, and just let the environment come from the parent shell (bash).

Please try the file that I sent and let me know how it goes, including running the driver script again.

Also, note that the driver script isn't soooo important anymore, since we have Paul's APQC HTML report, with active links to start afni and niivue.

-rick

Hi Rick,

Apologies for the delay, your file fixed my problem! I've been able to run all the scripts I mentioned without issue, which has allowed us to finally move forward with our data processing. Thank you again for all your help!

1 Like

That's great, thanks for the update!

-rick