Tutorial for using pyradiomics, no module named _collections

I can reproduce this in Slicer 4.8.1. import collections works fine at the Slicer python prompt, but fails from RadiomicsCLI. From vmmap, it looks like the script wrapper ends up pulling in system libpython, and confirmed by changing the wrapper call to DYLD_PRINT_LIBRARIES=1 $python_interpreter "$0Script" $* in SlicerRadiomicsCLI:

RadiomicsCLI standard error:

dyld: loaded: /opt/worksw/Slicer-4.8.1.app/Contents/bin/python-real
dyld: loaded: /usr/lib/libpython2.7.dylib
...

Presumably there is an ABI conflict. Somebody will need to dig through the (PYTHON)PATH and figure out why (I didn’t check nightly).

1 Like