Error that 3dTproject is not installed

Summary of what happened:

When trying to filter data using tproject.run(), get OSError: No command “3dTproject” found on host. Please check that the corresponding package is installed. I know Nipype is working, but not sure how to troubleshoot this.

Command used (and if a helper script was used, a link to the helper script or the command generated):

Code from Neuroimaging in Python - Pipelines and Interfaces — nipy pipeline and interfaces package

from nipype.interfaces import afni
tproject = afni.TProject()
tproject.inputs.in_file = ‘functional.nii’ #change file name and directory
tproject.inputs.bandpass = (0.00667, 99999)
tproject.inputs.polort = 3
tproject.inputs.automask = True
tproject.inputs.out_file = ‘projected.nii.gz’
tproject.cmdline
res = tproject.run() # doctest: +SKIP

Version:

Python 3.9.12

Environment (Docker, Singularity, custom installation):

Jupyter Notebook through Anaconda

Data formatted according to a validatable standard? Please provide the output of the validator:

BIDS

Relevant log outputs (up to 20 lines):

OSError Traceback (most recent call last)
Input In [4], in <cell line: 9>()
7 tproject.inputs.out_file = ‘projected.nii.gz’
8 tproject.cmdline
----> 9 res = tproject.run()

File ~/opt/anaconda3/lib/python3.9/site-packages/nipype/interfaces/base/core.py:398, in BaseInterface.run(self, cwd, ignore_exception, **inputs)
396 # Run interface
397 runtime = self._pre_run_hook(runtime)
→ 398 runtime = self._run_interface(runtime)
399 runtime = self._post_run_hook(runtime)
400 # Collect outputs

File ~/opt/anaconda3/lib/python3.9/site-packages/nipype/interfaces/afni/base.py:124, in AFNICommandBase._run_interface(self, runtime, correct_return_codes)
122 if platform == “darwin”:
123 runtime.environ[“DYLD_FALLBACK_LIBRARY_PATH”] = “/usr/local/afni/”
→ 124 return super(AFNICommandBase, self)._run_interface(
125 runtime, correct_return_codes
126 )

File ~/opt/anaconda3/lib/python3.9/site-packages/nipype/interfaces/base/core.py:753, in CommandLine._run_interface(self, runtime, correct_return_codes)
750 cmd_path = which(executable_name, env=runtime.environ)
752 if cmd_path is None:
→ 753 raise IOError(
754 'No command “%s” found on host %s. Please check that the ’
755 “corresponding package is installed.”
756 % (executable_name, runtime.hostname)
757 )
759 runtime.command_path = cmd_path
760 runtime.dependencies = (
761 get_dependencies(executable_name, runtime.environ)
762 if self._ldd
763 else “”
764 )

OSError: No command “3dTproject” found on host. Please check that the corresponding package is installed.

Screenshots / relevant information:

Hi @nwz and welcome to Neurostars!

Do you have AFNI installed and available on your path? Nipype doesn’t install these softwares for you: it is mainly for workflow management. If you do not have the software available for the interface you are trying to run (in your case, AFNI) then you will not be able to run your workflow.

Best,
Steven