- freesurfer version: 1.7.4
- operating system: e.g. macOS Ventura 13.0
Hello everyone,
I am stuck on this error message: Command not found: mkheadsurf. If someone can provide some advice on how to fix it, it would be greatly appreciated.
import os
import mne
subjects_dir=â/Applications/freesurfer/7.4.1/subjects/pilot_dataâ
subject=âsub-01â
os.environ[âFREESURFER_HOMEâ] = â/Applications/freesurfer/7.4.1â
mne.bem.make_scalp_surfaces(
subject=âsub-01â,
subjects_dir=âpilot_dataâ,
force=True,
overwrite=False,
no_decimate=False,
threshold=20,
mri=âT1.mgzâ,
verbose=None
)
- Creating a dense scalp tessellation with mkheadsurfâŠ
Running subprocess: mkheadsurf -subjid sub-01 -srcvol T1.mgz -thresh1 20 -thresh2 20
Command not found: mkheadsurf
Traceback (most recent call last):
Cell In[5], line 5
mne.bem.make_scalp_surfaces(
File :12 in make_scalp_surfaces
File /Applications/MNE-Python/.mne-python/lib/python3.10/site-packages/mne/bem.py:2443 in make_scalp_surfaces
run_subprocess(
File :12 in run_subprocess
File /Applications/MNE-Python/.mne-python/lib/python3.10/site-packages/mne/utils/misc.py:131 in run_subprocess
with running_subprocess(command, *args, **kwargs) as p:
File /Applications/MNE-Python/.mne-python/lib/python3.10/contextlib.py:135 in enter
return next(self.gen)
File /Applications/MNE-Python/.mne-python/lib/python3.10/site-packages/mne/utils/misc.py:263 in running_subprocess
p = subprocess.Popen(command, *args, **kwargs)
File /Applications/MNE-Python/.mne-python/lib/python3.10/subprocess.py:971 in init
self._execute_child(args, executable, preexec_fn, close_fds,
File /Applications/MNE-Python/.mne-python/lib/python3.10/subprocess.py:1847 in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: âmkheadsurfâ
I have verified that the file/script âmkheadsurfâ exists in the freesurfer/bin folder.
Advice appreciated. Thank in advance.