Install the latest AFNI on HPC


The technician of our HPC cluster (EasyBuild - Alliance Doc) tried to install the latest AFNI but had trouble including python dependencies. There is a feature to include a python package afnipy. If he disables this feature -DCOMP_PYTHON=OFF it compiles with cmake. If he enables -DCOMP_PYTHON=ON, it does not work as it requires more python packages that need to be bundled as well. It seems that bundling all of them is not trivial. For previous versions 20-23.1.08 of AFNI, we have corresponding modules and did not have this installation issue.

Do you have any suggestions? Is there a way to install everything properly as a module to load later? Otherwise, should we ignore the python dependencies for installation and make a virtual environment containing these dependencies when module load afni?


Hi Zhengchen,

What OS and version are being used for this? And what dependencies are suddenly proving problematic (matplotlib? flask-cors)? I am not sure what change might have recently happened.

Yes, for some dependencies, we suggest making conda environments, depending on the situation.

  • rick

Hi Rick,

Here is what cat cat /etc/os-release prints

NAME="Rocky Linux"
VERSION="8.9 (Green Obsidian)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="Rocky Linux 8.9 (Green Obsidian)"

I don't know what dependencies are causing the problem, I don't have access to install module on the cluster. IT support only told me that it is related to "afnipy". They can install AFNI with -DCOMP_PYTHON=OFF as a module for users to load, do you think after that I can install "afnipy" in my own environment and module load afni will then give me complete functionalities including the latest updated especially those related to APQC? If so, is there a list of dependencies or a convenient way to install all of them in one shot? Maybe I just do a -check_all after the module load and install whatever is missing?


Hi Rick,

I tried to install AFNI bins into my own home folder. -check_all only gives me the following missing libs, I guess I will ask the IT administrator to install these libs as a module then I don't have to install AFNI as a module and I could update AFNI bins whenever I want.

*  missing binary library: 
*  missing binary library: 
*  missing binary library:


Hi Zhengchen,

Sure, it would be good to pass that to the admins. Note that there is also a pre-compiled Rocky 8 package. You could also try testing that yourself using something like:

mkdir ~/my.rocky8.abin
@update.afni.binaries -package linux_rocky_8 -bindir ~/my.rocky8.abin

It might be helpful to be able to compare the packages in any case. Note that an afnipy directory comes inside the packaged abin (since the included python programs use it).

  • rick
1 Like

Hello @rickr, our admins can install afni bins but not afnipy as they can not use python install with easybuild (Update EB hooks - raise error when use_pip is not used · Issue #138 · ComputeCanada/software-stack · GitHub). The only way they can do is "pip install" but there is no afnipy existing. Is there a way that I can install afnipy in my own virtual environment? Should I download afni/src/python_scripts at master · afni/afni · GitHub and run the Thanks.

Indeed, for the most part, none of us runs, and we do not use that on any system that I know of. The afnipy library generally just comes with the abin package (as with the linux_rocky_8 package you may have installed with @update.afni.binaries). Then new versions are easily kept together.
You probably do not need afnipy "installed" at all, just leave it as a sub-directory of the main "binary" directory. No or pip install would be needed in that case.

Thanks Rick, will give it a try.