Specifying dcm2niix version used in Nipype

Dear nipype and dcm2niix experts,

I am trying to perform DICOM to NIFTI BIDS conversion using heudiconv that relies on nipype and dcm2niix. I installed heudiconv and its dependencies in a conda environement where I have several versions of dcm2niix installed. Is there a way to specify the version or path of the dcm2niix instance used to perform the conversion ?

I have tried to modify the cmd property of nipype DCM2NIIX class but it did not worked.

Best Regards

Why not just to adjust your PATH env variable and have leading folder which would point to the place with the desired version of dcm2niix binary, e.g. PATH=/my/path/to/dcm2niix-v1.0.20220720:$PATH my_nipype_script.py ?

Thanks @yarikoptic for your answer, your solution is working fine.

At first, I wanted to keep apart environment specification and code execution (I am using a python script to automatically generate heuristic.py file from a configuration file and run the conversion using workflow python function of heudiconv)

Have a nice day