afni_system_check.py command not found after WSL2(Ubuntu 22.04) fast set-up

I'm using WSL2 Ubuntu 22.04.5 LTS on a windows 11 OS. I followed the quick set-up instructions to install AFNI (bash terminal), the installation ran without any errors but when I run the final system check command (afni_system_check.py -check_all) it returns ''afni_system_check.py: command not found''.

When searching my WSL directories for afni_system_check.py the file doesn't appear in any directory. I attempted to install via the quick set-up again and then using the instructions for the slow set-up but these attempts end up with errors (attached screenshot of the the failed check command and the errors that result from reattempting the fast, then slow, set-up).

I'm a real novice using Linux and I am coming fresh to MRI imaging data so please feel free to suggest obvious fixes as I probably have never encountered then. Thanks.

Howdy-

Before going too far down this road, is it possible for you to install WSL-1 instead of WSL-2? We point people to WSL-1, because graphics are a lot harder in WSL-2 for some reason (sigh). In the install instructions here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_windows10.html#install-linux
... we note:

Click here to install **WSL 1** (*noooot WSL 2*), and probably select a modern Ubuntu (like “Ubuntu 22.04”, at time of writing here) as your desired flavor of Linux:

https://docs.microsoft.com/en-us/windows/wsl/install-manual

--pt

Thanks Paul, if the trouble persists I will go down this route. Currently I have managed to complete the slow setup steps up to the command rPkgsInstall -pkgs ALL.

This returns an error of @global_parse: Command not found despite the file @global_parse residing in the same directory as rPkgsInstall.

I'm hesitant to install WSL1 only because I've spent quite some time installing a variety of packages on my current subsystem. However, if the troubles persist its great to know there's that as an option. Thanks again.

OK.

Re the missing AFNI packages, what is the output is:

cd 
ls

?

And I will send you email instructions to see what your ~/.bashrc and other shell setup files have in them.

--pt

OK, the "ChatPT" (note the spelling) results from some emailing, which I summarize below for future readers:

  • We checked whether the ~/.*rc files had the appropriate path information to know where to find AFNI. This is typically in ~/abin, which default setup. In particular here, since the user's terminal shell was in bash, I checked ~/.bashrc. This did have the correct information, from the AFNI setup script that is part of the setup instructions, so that was good.
    • I could have just suggested running: grep abin ~/.*rc to see if "abin" appeared in the shell command files, that might have been simpler.
  • Checking cd; ls from above was also run, so see if the "abin" directory was actually in the home directory, as it should been at that point. It was, so that was also good.
    • We also ran ls ~/abin | wc -l to count the number of files present, to make sure it wasn't empty. There should be several hundred.
  • At that point, since the shell command files were appropriately set up, and the ~/abin/ directory also appeared to exist in the right spot and be populated, the thing to do was just to source (= reread) the settings file for the shell by running source ~/.bashrc, or open a new terminal so that it would be known.
    • after doing this, we checked the output of which afni to see if the terminal knew where afni (and other AFNI programs) were, and it did. So, things were good.

So, the TL;DR is that after running the setup script, if AFNI doesn't appear to be found or installed still, opening a new terminal to have the shell settings-file re-read is a useful thing to try.

--pt