Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Installing dcm2bids on Windows

Gaspard Cereza edited this page Jun 30, 2020 · 1 revision

Installing dcm2niix:

  1. Type in cmd: curl -fLO https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_win.zip
  2. Go to : advanced system setting > environment variables > path > edit > new
  3. Add C:\Program Files\dcm2niix as a new path

Installing dcm2bids (based on Nick Guenther's patch):

  1. Type in cmd: pip install dcm2bids
  2. Go to: advanced system setting > environment variables > path > edit > new
  3. Add C:\Users\username\AppData\Local\Programs\Python*\Scripts as a new path
  4. Install Nick's patch: pip install dcm2bids@git+git://github.com/kousu/Dcm2Bids@package-find_packages
  5. Open C:\Users\username\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\dcm2bids-2.1.4-py3.8.egg\dcm2bids\utils.py in a code editor. Go to the bottom and find "run_shell_command", then add "posix=False" to it:
def run_shell_command(commandLine):
    """ Wrapper of subprocess.check_output
    Returns:
        Run command with arguments and return its output
    """
    logger = logging.getLogger(__name__)
    logger.info("Running %s", commandLine)
    return check_output(shlex.split(commandLine, posix=False))```
Clone this wiki locally