I’m trying to use the TotalSegmentator extension in 3D Slicer for segmenting an MRI dataset, but I’m running into a consistent error during the dependency installation step.
When clicking “Apply” in the TotalSegmentator module, I get:
PyTorch Python package is required. Installing… (it may take several minutes)
Failed to install Python dependencies:
PyTorchUtilsLogic.installTorch() got an unexpected keyword argument ‘torchVisionVersionRequirement’
nvironment:
OS: Windows (also tested on macOS with same error)
Slicer version: 5.11.0 (Preview)
(Also tested on 5.10 stable with same issue
Extensions installed:
TotalSegmentator (latest)
PyTorch (latest via Extensions Manager)
nnUNet (latest)
Observations: PyTorch appears installed and visible in Extensions Manager. Error occurs during the automatic dependency installation step triggered by TotalSegmentator. Suggests a mismatch between TotalSegmentator and PyTorchUtils API (unexpected argument)
Is this a known compatibility issue between TotalSegmentator and current PyTorchUtils versions? Is there a recommended Slicer version / extension version combination that avoids this? Is there a way to bypass the internal PyTorch installation step and point to an existing PyTorch install?
Sorry, that’s due to a recent regression that I cause when fixing the macOS installation. I’ve fixed the issue now, please retry tomorrow. You can either use the latest Slicer Stable Release (Slicer-5.10) and update the TotalSegmentator extension; or install the latest Slicer Preview Release (Slicer-5.11) tomorrow.
You can make these changes locally in TotalSegmentator.py file on your computer (you can find the location of the file in the error message in the Python console); or wait for the nightly builds to complete at around 10am EST.