Run a Python script as subprocess from Slicer

You can pip install it in Slicer’s Python environment (PythonSlicer.exe -m pip install BraTS-Toolkit). There should be no need to mess with anaconda.

There is a problem that this package pins a very specific version of SimpleITK (and a couple of other Python packages), which makes Slicer remove the special SimpleITK distribution that is bundled with Slicer, so modules that rely on SimpleITK may stop working. See Did sitkUtils.PullVolumeFromSlicer() break with Slicer 5.2? - #9 by lassoan for more details.

Another bad thing about this bratstoolkit is that it comes with the strictest possible copyleft license. If you use this code then you must make all other code in the same project public. Probably you can find other segmentation toolkits that provide similar features and do not come with such heavy restrictions.