# nnUNet fails with ModuleNotFoundError: No module named 'torchvision.ops'

**URL:** <https://discourse.slicer.org/t/nnunet-fails-with-modulenotfounderror-no-module-named-torchvision-ops/46802>\
**Category:** Support\
**Tags:** nnunet\
**Created:** [April 21, 2026, 8:43pm UTC](https://discourse.slicer.org/t/nnunet-fails-with-modulenotfounderror-no-module-named-torchvision-ops/46802 "2026-04-21T20:43:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 9, 2026, 5:38am UTC](https://discourse.slicer.org/t/nnunet-fails-with-modulenotfounderror-no-module-named-torchvision-ops/46802/5 "2026-05-09T05:38:13Z")

</div>

Yes, it looks like that. I’ve already fixed up TotalSegmentator and based on that I’ve created a yet untested patch for the NNUnet extension in Slicer:

> <https://github.com/KitwareMedical/SlicerNNUnet/pull/23>
>
> Ensure correct nnunet, torch, torchvision, numpy versions are installed.
> 
> fixe…s #22

Please give it a try and let me know if the changes fix the problem on your computer.

---

_[View the full topic](https://discourse.slicer.org/t/nnunet-fails-with-modulenotfounderror-no-module-named-torchvision-ops/46802)._
