# Failed to compute results. No module named 'torch'

**URL:** <https://discourse.slicer.org/t/failed-to-compute-results-no-module-named-torch/29280>\
**Category:** Support\
**Created:** [May 4, 2023, 3:31am UTC](https://discourse.slicer.org/t/failed-to-compute-results-no-module-named-torch/29280 "2023-05-04T03:31:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TSMemo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tsmemo/32/65881_2.png) [@TSMemo](https://discourse.slicer.org/u/TSMemo)\
**Post date:** [May 4, 2023, 3:31am UTC](https://discourse.slicer.org/t/failed-to-compute-results-no-module-named-torch/29280/1 "2023-05-04T03:31:14Z")

</div>

Hi,  
I’m having trouble applying the program ‘Total Segmentator’. I’ve tried every possible method below Mr Anish\_Raj’s question posted on December 22, 2022 but still encountered a failure about PyTorch as mentioned in the topic.  
Detailed error:  
Traceback (most recent call last):  
File “E:\Slicer 5.2.2\bin\Python\slicer\util.py”, line 2967, in tryWithErrorDisplay  
yield  
File “E:/Slicer 5.2.2/NA-MIC/Extensions-31382/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py”, line 255, in onApplyButton  
self.logic.setupPythonRequirements()  
File “E:/Slicer 5.2.2/NA-MIC/Extensions-31382/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py”, line 618, in setupPythonRequirements  
torch = torchLogic.installTorch(askConfirmation=True)  
File “E:/Slicer 5.2.2/NA-MIC/Extensions-31382/PyTorch/lib/Slicer-5.2/qt-scripted-modules/PyTorchUtils.py”, line 195, in installTorch  
import torch  
ModuleNotFoundError: No module named ‘torch’  
Please tell me which steps need to be corrected,  
Thanks.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [May 4, 2023, 12:27pm UTC](https://discourse.slicer.org/t/failed-to-compute-results-no-module-named-torch/29280/2 "2023-05-04T12:27:16Z")

</div>

Please start all over again and [follow these instructions](https://discourse.slicer.org/t/totalsegmentator-error-at-first-run-command-pip-install-git-https-github-com-wasserth-totalsegmentator-git-no-deps-returned-non-zero-exit-status/26715/38).

---

<div class="post-metadata">

**Author:** ![TSMemo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tsmemo/32/65881_2.png) [@TSMemo](https://discourse.slicer.org/u/TSMemo)\
**Post date:** [May 5, 2023, 6:39am UTC](https://discourse.slicer.org/t/failed-to-compute-results-no-module-named-torch/29280/3 "2023-05-05T06:39:58Z")

</div>

> [@TSMemo](#):
>
> m

Thanks a lot for your instructions, it turned out to be a problem with the modules of Python that I installed before, and the performance of my hardware was not good enough for some examples about image processing. I tried your steps again strictly in the lab for postgraduates and got the results successfully.
