Installment dcm2bids


As I am a bit new, I am experiencing some problems with the installment of dcm2bids.

If I just follow this tutorial (2. Tutorial - Dcm2Bids), it seems very clear, however, in the tutorial they ask to make a yaml file, and then this file needs to be saved inside the dcm2bids-tutorial file, however, I dont know how to create such a file…Someone has experience with this?



You do not need to create one. Just make an environment in Anaconda that has all the necessary dependencies.


Thank you very much Steven

Ok I managed to create the environment in conda, and thats working, however as I try to activate dcm2bids with the command ‘conda activate dcm2bids’ in my command prompt, it says that my shell has not been properly configured…

‘CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.
If using ‘conda activate’ from a batch script, change your
invocation to ‘CALL conda.bat activate’.’

As this is the last step before installment, I dont really understand why it doesnt work, as the previous steps now all have been completed…

Oh I think I found a solution, when I tried the command ‘activate.bat dcm2bids’ I got a response and then ‘dcm2bids --help’ gave me an equal response as on the tutorial for installment, s I guess this is fixed now and Im ready to go!

Hi @SeriD,
Great to see you found your way.
We definitively need more people with windows environment to complete our dcm2bids tutorial.
Don’t hesitate to write any feedback as a github issue or even suggest a PR.
Thank you again.

Thank you.

Im am now doing the tutorial, but I am not sure this program works on windows…?

This step: dcm2bids_helper -d sourcedata/dcm_qa_nih/In/
does not seem to work immediately, I get some sort of filenotfounderror

Even if I alter the path ‘sourcedata/dcm_ga_nih/In’ to a more specified path with actual DCM files (‘dcm2bids_helper -d sourcedata\dcm_qa_nih\In\20180918GE\mr_0004’), I still get the same error…(all previous steps gave valid output)

@SeriD May you please provide:

  1. The contents of sourcedata/dcm_qa_nih/In/ (with the ls or dir command depending on your shell configuration)
  2. The full error message

Hi Steven:

Volume in drive C is Windows
Volume Serial Number is 0EBB-E795

Directory of C:\GBW_MyDownloads\Anaconda\envs\dcm2bids-tutorial\bids_project\sourcedata\dcm_qa_nih\In

29/04/2022 13:27 .
29/04/2022 13:27 …
29/04/2022 13:27 20180918GE
29/04/2022 13:27 20180918Si
0 File(s) 0 bytes
4 Dir(s) 1.813.423.706.112 bytes free

C:\GBW_MyDownloads\Anaconda\envs\dcm2bids-tutorial>dcm2bids_helper -d sourcedata/dcm_qa_nih/In/
Traceback (most recent call last):
File “C:\GBW_MyDownloads\Anaconda\Scripts\”, line 9, in
File “C:\GBW_MyDownloads\Anaconda\lib\site-packages\dcm2bids\”, line 42, in main
rsl =
File “C:\GBW_MyDownloads\Anaconda\lib\site-packages\dcm2bids\”, line 90, in run
File “C:\GBW_MyDownloads\Anaconda\lib\site-packages\dcm2bids\”, line 100, in execute
output = run_shell_command(cmd)
File “C:\GBW_MyDownloads\Anaconda\lib\site-packages\dcm2bids\”, line 113, in run_shell_command
return check_output(shlex.split(commandLine))
File “C:\GBW_MyDownloads\Anaconda\lib\”, line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “C:\GBW_MyDownloads\Anaconda\lib\”, line 505, in run
with Popen(*popenargs, **kwargs) as process:
File “C:\GBW_MyDownloads\Anaconda\lib\”, line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “C:\GBW_MyDownloads\Anaconda\lib\”, line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

  1. It looks like there are no dicoms in the path you specified.
  2. If you are in a windows shell, you should make sure that your paths use forward instead of back slashes.

Weirdly, there are DICOMS in that path, I believe the same way as described in the tutorial…I also tried to specify the path more toward the folder where the DICOMS really are, as shown in the picture, but I got the same error.

  1. Thanks, I also tried that indeed but no success yet

It seems that I cannot make this work on windows… If anyone else uses this in Windows let me know! I will try another program.