# TotalSegmentator setup

**URL:** <https://discourse.slicer.org/t/totalsegmentator-setup/26683>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [December 11, 2022, 1:53pm UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683 "2022-12-11T13:53:32Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![linda\_varghese](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linda_varghese/32/66243_2.png) [@linda\_varghese](https://discourse.slicer.org/u/linda_varghese)\
**Post date:** [June 4, 2023, 8:31pm UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/21 "2023-06-04T20:31:57Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/f/0f886bb1ed1713e4136f279d6d7339f4b42fef38.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 4, 2023, 11:26pm UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/22 "2023-06-04T23:26:25Z")

</div>

Thank you, it seems that by default an old version of pytorch got installed. We have observed this on some computers, but could not figure out why it happens (why not the latest version is installed). Thr good news that the fix is easy:

- uninstall pytorch (you can use Pytorch Utils module for this)
- restart Slicer
- install Pytorch-1.12 - by typing this into the Python console in Slicer: `pip_install("torch>=1.12")`

---

<div class="post-metadata">

**Author:** ![linda\_varghese](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linda_varghese/32/66243_2.png) [@linda\_varghese](https://discourse.slicer.org/u/linda_varghese)\
**Post date:** [June 13, 2023, 9:11am UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/23 "2023-06-13T09:11:03Z")

</div>

Thanks for the suggestion, now it worked.But after this updating am getting an error message before starting the slicer. What would be the reason for that?

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/8/680c3004a1109c2b35d7e8c394ce1d3536428aa9.png)

---

<div class="post-metadata">

**Author:** ![linda\_varghese](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linda_varghese/32/66243_2.png) [@linda\_varghese](https://discourse.slicer.org/u/linda_varghese)\
**Post date:** [June 20, 2023, 8:09am UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/24 "2023-06-20T08:09:02Z")

</div>

> [@lassoan](#):
>
> pip\_install(“torch\>=1.12”)

Hi Team, am facing the same error again while running Total Segmentor module, even after installing the 1.12 version pyTorch.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/c/7ccf892f1635c8ecf152ce4b8b548d087c6dcce4.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 20, 2023, 11:25am UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/25 "2023-06-20T11:25:11Z")

</div>

Could you copy here the entire message In the details section of the error popup?

---

<div class="post-metadata">

**Author:** ![linda\_varghese](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linda_varghese/32/66243_2.png) [@linda\_varghese](https://discourse.slicer.org/u/linda_varghese)\
**Post date:** [June 23, 2023, 7:33am UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/26 "2023-06-23T07:33:58Z")

</div>

Traceback (most recent call last):  
File “C:\Users\lvarghese\AppData\Local\NA-MIC\Slicer 5.2.2\bin\Python\slicer\util.py”, line 2967, in tryWithErrorDisplay  
yield  
File “C:/Users/lvarghese/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py”, line 264, in onApplyButton  
self.logic.process(self.ui.inputVolumeSelector.currentNode(), self.ui.outputSegmentationSelector.currentNode(),  
File “C:/Users/lvarghese/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py”, line 770, in process  
self.logProcessOutput(proc)  
File “C:/Users/lvarghese/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py”, line 663, in logProcessOutput  
raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)  
subprocess.CalledProcessError: Command ‘[‘C:/Users/lvarghese/AppData/Local/NA-MIC/Slicer 5.2.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\lvarghese\AppData\Local\NA-MIC\Slicer 5.2.2\lib\Python\Scripts\TotalSegmentator’, ‘-i’, ‘C:/Users/lvarghese/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-06-23\_09+32+41.573/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/lvarghese/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-06-23\_09+32+41.573/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]’ returned non-zero exit status 120.

It had worked earlier ,now i was trying to work on Monai and suddelnly this is not working.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 23, 2023, 11:27am UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/27 "2023-06-23T11:27:33Z")

</div>

Maybe try to install Slicer from scratch into a new folder and install totalsegmentator but not install monai.

---

<div class="post-metadata">

**Author:** ![linda\_varghese](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linda_varghese/32/66243_2.png) [@linda\_varghese](https://discourse.slicer.org/u/linda_varghese)\
**Post date:** [June 23, 2023, 12:14pm UTC](https://discourse.slicer.org/t/totalsegmentator-setup/26683/28 "2023-06-23T12:14:16Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/6/96f662ad6c57983980da84a8a9b9953bdee375fc.png)  
I had re installed slicer and didn’t install MONAI and again the total segmentor showing same error.

[Previous page](https://discourse.slicer.org/t/totalsegmentator-setup/26683.md?page=1)
