Hey folks,
I am completely new to nipype (and also to docker) and would like to switch over to it in order to avoid working with different softwares differently. It seems like a lot of nipype users seem to use docker in order to run their analyses. However, my IT department doesn’t want to install docker on the server which I am working on (where my data and software is stored).
So, what I did was to start simple and to just install nipype on my personal machine (Windows 10) using:
conda install --channel conda-forge nipype
I also have MATLABR2020a and SPM12 installed on my machine. I just wanted ro run a super simple toy example where one single image is smoothed:
import nipype.interfaces.spm as spm
smooth = spm.Smooth()
smooth.inputs.in_files = "path/to/my/nifti_file.nii"
smooth.inputs.fwhm = [4, 4, 4]
smooth.run()
Two things to that:
1.) First of all I got an error (which might be related to this issue on GitHub):
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 375, in run
self._check_version_requirements(self.inputs)
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 275, in _check_version_requirements
if names and self.version:
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\spm\base.py", line 358, in version
info_dict = Info.getinfo(
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\spm\base.py", line 227, in getinfo
out = mlab.run()
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 419, in run
runtime = self._run_interface(runtime)
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\matlab.py", line 170, in _run_interface
runtime = super(MatlabCommand, self)._run_interface(runtime)
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 812, in _run_interface
runtime = run_command(runtime, output=self.terminal_output)
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\utils\subprocess.py", line 103, in run_command
proc = Popen(
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 105, in __init__
super(SubprocessPopen, self).__init__(*args, **kwargs)
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
TypeError: environment can only contain strings
2.) I just got a simple question: How does nipype know where my MATLAB version and SPM is laying on my PC? As far as I understood, nipype contains wrapper functions that open instances of those softwares in the background which again execute the actual code that transforms my images, runs analyses on them, etc. So for example, if want to use nipype to run SPM commands on my personal machine (as in the example code above), what is nipype doing in the background? Does it search for SPM and MATLAB on my PC? Why do I not need to provide it with paths to MATLAB and SPM?