我已经安装了这些:
conda install -c conda-forge nipype
conda install -c conda-forge nitime
conda install -c conda-forge nibabel
conda install -c conda-forge nilearn 样本代码:
from nipype.interfaces import fsl
import os
import numpy as np
import nitime
from nitime.timeseries import TimeSeries
from nitime.analysis import CorrelationAnalyzer, CoherenceAnalyzer
from nitime.utils import percent_change
import nibabel as nib
import nilearn
from nilearn import datasets, input_data
from nilearn.connectome import ConnectivityMeasure
m = fsl.Merge()
m.inputs.in_files = volumes
...
m.run()它会产生错误:
OSError:没有在主机上找到"fslmerge“命令。请检查是否安装了相应的软件包。
你能帮帮我吗?
发布于 2020-01-12 09:34:13
我刚刚遇到了同样的问题,让我困惑了一个多小时。我意识到python中的fsl.Merge命令只是围绕fsl命令:fsl。因此,在执行python脚本之前,需要加载fsl的最新版本。应该是一个简单的解决办法:
module purge ; module load anaconda/2.7-4.3.1 fsl/6.0.1
source ~/Settings/MyCondaEnv.sh
conda activate local
python ~FSLMERGE.pyhttps://stackoverflow.com/questions/54741802
复制相似问题