# Dental segmantator

**URL:** <https://discourse.slicer.org/t/dental-segmantator/40519>\
**Category:** Support\
**Created:** [December 5, 2024, 2:30am UTC](https://discourse.slicer.org/t/dental-segmantator/40519 "2024-12-05T02:30:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 5, 2024, 2:30am UTC](https://discourse.slicer.org/t/dental-segmantator/40519/1 "2024-12-05T02:30:04Z")

</div>

I am trying the dental segmentator with the sample CBCT. During the package installation I got this error message. This is with the R33134 on Linux:

```auto
Installing collected packages: connected-components-3d
Successfully installed connected-components-3d-3.21.0
ERROR: Ignored the following versions that require a different python version: 2.6.0 Requires-Python <4,>=3.10; 2.6.1 Requires-Python <4,>=3.10; 2.6.2 Requires-Python <4,>=3.10; 2.7.0 Requires-Python <4,>=3.10; 2.7.1 Requires-Python <4,>=3.10; 3.0.0b1 Requires-Python >=3.10
ERROR: Could not find a version that satisfies the requirement blosc2>=3.0.0b4 (from versions: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.1, 0.5.2, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 2.0.0, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.5.0, 2.5.1)
ERROR: No matching distribution found for blosc2>=3.0.0b4

```

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 5, 2024, 5:08am UTC](https://discourse.slicer.org/t/dental-segmantator/40519/2 "2024-12-05T05:08:27Z")

</div>

This seems to match existing report at which has some workarounds mentioned:

> <https://github.com/gaudot/SlicerDentalSegmentator/issues/21>
>
> I was using 3D Slicer 5.7 2024-04-25 because it is the recommended version to wo…rk with blenderfordental software.
> 
> Today i tried to use dentalsegmentator and i get error of inference folder and doesnt segment.
> So i uninstall the 3D Slicer completely and tried same version and lastest version and i get this error everytime, here is the log:
> 
> 2024/11/26 19:41:35.182 :: Start nnUNet install with requirements : nnunetv2
> 2024/11/26 19:41:35.187 :: - Installing pandas...
> 2024/11/26 19:41:42.688 :: - Installing pillow\<10.1...
> 2024/11/26 19:41:47.118 :: - Installing nnunetv2 --no-deps...
> 2024/11/26 19:41:48.244 :: - Installing acvl-utils\<0.3,\>=0.2 --no-deps...
> 2024/11/26 19:41:48.964 :: - Installing batchgenerators --no-deps...
> 2024/11/26 19:41:49.915 :: - Installing scikit-image --no-deps...
> 2024/11/26 19:41:51.590 :: - Installing networkx\>=2.8 --no-deps...
> 2024/11/26 19:41:53.860 :: - Installing imageio\>=2.33 --no-deps...
> 2024/11/26 19:41:54.776 :: - Installing tifffile\>=2022.8.12 --no-deps...
> 2024/11/26 19:41:55.791 :: - Installing lazy-loader\>=0.4 --no-deps...
> 2024/11/26 19:41:56.504 :: - Installing scikit-learn --no-deps...
> 2024/11/26 19:41:59.316 :: - Installing joblib\>=1.2.0 --no-deps...
> 2024/11/26 19:42:00.224 :: - Installing threadpoolctl\>=3.1.0 --no-deps...
> 2024/11/26 19:42:01.059 :: - Installing future --no-deps...
> 2024/11/26 19:42:02.205 :: - Installing unittest2 --no-deps...
> 2024/11/26 19:42:03.207 :: - Installing argparse --no-deps...
> 2024/11/26 19:42:04.062 :: - Installing traceback2 --no-deps...
> 2024/11/26 19:42:04.816 :: - Installing linecache2 --no-deps...
> 2024/11/26 19:42:05.546 :: - Installing connected-components-3d --no-deps...
> 2024/11/26 19:42:06.328 :: - Installing blosc2\>=3.0.0b4 --no-deps...
> 2024/11/26 19:42:07.080 :: Install returned non-zero exit status : Command '\['C:/Users/PC/AppData/Local/slicer.org/Slicer 5.7.0-2024-11-25/bin/../bin\\\\PythonSlicer.EXE', '-m', 'pip', 'install', 'blosc2\>=3.0.0b4', '--no-deps'\]' returned non-zero exit status 1.. Attempting to continue...
> 2024/11/26 19:42:07.085 :: Error occurred during install : blosc2
> 
> I pressed apply again in hope it will fix itself and i am stuck at download model weights for a while.
> 
> I restarted the app and installed pytorch compatible with my gpu in pytorchutils extension and run the extension again and then i got different error, here is the log:
> 
> 2024/11/26 20:01:45.238 :: nnUNet is already installed (2.5.1) and compatible with requested version (nnunetv2).
> 2024/11/26 20:01:48.296 :: Transferring volume to nnUNet in C:/Users/PC/AppData/Local/Temp/Slicer-RuOTvc
> 2024/11/26 20:02:06.380 :: Starting nnUNet with the following parameters:
> 2024/11/26 20:02:06.380 :: 
> 2024/11/26 20:02:06.380 :: C:\\Users\\PC\\AppData\\Local\\slicer.org\\Slicer 5.7.0-2024-11-25\\lib\\Python\\Scripts\\nnUNetv2\_predict.exe -i C:/Users/PC/AppData/Local/Temp/Slicer-RuOTvc/input -o C:/Users/PC/AppData/Local/Temp/Slicer-RuOTvc/output -d Dataset111\_453CT -tr nnUNetTrainer -p nnUNetPlans -c 3d\_fullres -f 0 -npp 1 -nps 1 -step\_size 0.5 -device cuda -chk checkpoint\_final.pth --disable\_tta
> 2024/11/26 20:02:06.380 :: 
> 2024/11/26 20:02:06.380 :: JSON parameters :
> 2024/11/26 20:02:06.380 :: {
> 2024/11/26 20:02:06.380 :: "folds": "0",
> 2024/11/26 20:02:06.380 :: "device": "cuda",
> 2024/11/26 20:02:06.380 :: "stepSize": 0.5,
> 2024/11/26 20:02:06.380 :: "disableTta": true,
> 2024/11/26 20:02:06.380 :: "nProcessPreprocessing": 1,
> 2024/11/26 20:02:06.380 :: "nProcessSegmentationExport": 1,
> 2024/11/26 20:02:06.380 :: "checkPointName": "",
> 2024/11/26 20:02:06.380 :: "modelPath": {
> 2024/11/26 20:02:06.380 :: "\_path": "C:\\\\Users\\\\PC\\\\AppData\\\\Local\\\\slicer.org\\\\Slicer 5.7.0-2024-11-25\\\\slicer.org\\\\Extensions-33123\\\\DentalSegmentator\\\\lib\\\\Slicer-5.7\\\\qt-scripted-modules\\\\Resources\\\\ML"
> 2024/11/26 20:02:06.380 :: }
> 2024/11/26 20:02:06.380 :: }
> 2024/11/26 20:02:06.405 :: nnUNet preprocessing...
> 2024/11/26 20:02:08.233 :: Traceback (most recent call last):
> 2024/11/26 20:02:08.233 :: File "C:\\Users\\PC\\AppData\\Local\\slicer.org\\Slicer 5.7.0-2024-11-25\\lib\\Python\\Lib\\runpy.py", line 197, in \_run\_module\_as\_main
> 2024/11/26 20:02:08.234 :: return \_run\_code(code, main\_globals, None,
> 2024/11/26 20:02:08.234 :: File "C:\\Users\\PC\\AppData\\Local\\slicer.org\\Slicer 5.7.0-2024-11-25\\lib\\Python\\Lib\\runpy.py", line 87, in \_run\_code
> 2024/11/26 20:02:08.234 :: exec(code, run\_globals)
> 2024/11/26 20:02:08.234 :: File "C:\\Users\\PC\\AppData\\Local\\slicer.org\\Slicer 5.7.0-2024-11-25\\lib\\Python\\Scripts\\nnUNetv2\_predict.exe\\\_\_main\_\_.py", line 4, in \<module\>
> 2024/11/26 20:02:08.234 :: File "C:\\Users\\PC\\AppData\\Local\\slicer.org\\Slicer 5.7.0-2024-11-25\\lib\\Python\\Lib\\site-packages\\nnunetv2\\inference\\predict\_from\_raw\_data.py", line 18, in \<module\>
> 2024/11/26 20:02:08.234 :: from tqdm import tqdm
> 2024/11/26 20:02:08.234 :: ModuleNotFoundError: No module named 'tqdm'
> 2024/11/26 20:02:08.469 :: Loading inference results...
> 2024/11/26 20:02:10.316 :: Error loading results :
> 2024/11/26 20:02:10.316 :: Failed to load the segmentation.
> 2024/11/26 20:02:10.316 :: Something went wrong during the nnUNet processing.
> 2024/11/26 20:02:10.316 :: Please check the logs for potential errors and contact the library maintainers.
> 
> My PC Specs:
> 
> Windows 11
> Ryzen 7 7700X
> 32GB Ram
> RTX 4070

Where `acvl_utils` a dependency of nnUNet has a caused a dependency issue again. This time due to this commit:

> <https://github.com/MIC-DKFZ/acvl_utils/commit/4cad0deb89dc97b6f4ecfdfd553b994bee076274>

Appears to similarly impact TotalSegmentator which uses nnUNet.

> <https://github.com/wasserth/TotalSegmentator/issues/385#issuecomment-2486230801>
>
> Hi @wasserth
> I am from the MITK development team working to update TotalSegment…ator to v2.4 for our upcoming release.
> I am testing out installing TotalSegmentator via MITK and I see that TotalSegmentator has stopped working due to import errors.
> Error log:
> 
> \`\`\`
> Traceback (most recent call last):
> File "\<frozen runpy\>", line 198, in \_run\_module\_as\_main
> File "\<frozen runpy\>", line 88, in \_run\_code
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Scripts\\TotalSegmentator.exe\\\_\_main\_\_.py", line 7, in \<module\>
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\totalsegmentator\\bin\\TotalSegmentator.py", line 138, in main
> totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\totalsegmentator\\python\_api.py", line 126, in totalsegmentator
> from totalsegmentator.nnunet import nnUNet\_predict\_image # this has to be after setting new env vars
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\totalsegmentator\\nnunet.py", line 30, in \<module\>
> from nnunetv2.inference.predict\_from\_raw\_data import nnUNetPredictor
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\nnunetv2\\inference\\predict\_from\_raw\_data.py", line 22, in \<module\>
> from nnunetv2.inference.data\_iterators import PreprocessAdapterFromNpy, preprocessing\_iterator\_fromfiles, \\
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\nnunetv2\\inference\\data\_iterators.py", line 12, in \<module\>
> from nnunetv2.preprocessing.preprocessors.default\_preprocessor import DefaultPreprocessor
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\nnunetv2\\preprocessing\\preprocessors\\default\_preprocessor.py", line 25, in \<module\>
> from nnunetv2.preprocessing.cropping.cropping import crop\_to\_nonzero
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\nnunetv2\\preprocessing\\cropping\\cropping.py", line 5, in \<module\>
> from acvl\_utils.cropping\_and\_padding.bounding\_boxes import get\_bbox\_from\_mask, crop\_to\_bbox, bounding\_box\_to\_slice
> File "C:\\DKFZ\\TotalSegmentator\_work\\.venv\_7Nov\\Lib\\site-packages\\acvl\_utils\\cropping\_and\_padding\\bounding\_boxes.py", line 5, in \<module\>
> import blosc2
> ModuleNotFoundError: No module named 'blosc2'
> \`\`\`
> Merely pip installing \`blosc2\` leads to even more import errors. 
> It would be great if you can take a look.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 5, 2024, 5:22am UTC](https://discourse.slicer.org/t/dental-segmantator/40519/3 "2024-12-05T05:22:00Z")

</div>

I’ve submitted an issue to `acvl_utils` to work to fix the dependency issue.

> <https://github.com/MIC-DKFZ/acvl_utils/issues/4>
>
> @FabianIsensee The introduction of blosc2 and the version specified in https://g…ithub.com/MIC-DKFZ/acvl\_utils/commit/4cad0deb89dc97b6f4ecfdfd553b994bee076274 does not have support for Python 3.9 even though nnUNet specifies it supports Python 3.9.
> 
> At minimum could you update this package to explicitly state the \`python\_requires\` in setup.py so that pip can better manage dependencies? See https://github.com/pypa/sampleproject/blob/db5806e0a3204034c51b1c00dde7d5eb3fa2532e/setup.py#L123 
> 
> See how this has impacted TotalSegmentator again as mentioned at https://github.com/wasserth/TotalSegmentator/issues/385#issuecomment-2486230801.
> 
> Example of dependency handling failing at time of install.
> \`\`\`
> ERROR: Ignored the following versions that require a different python version: 2.6.0 Requires-Python \<4,\>=3.10; 2.6.1 Requires-Python \<4,\>=3.10; 2.6.2 Requires-Python \<4,\>=3.10; 2.7.0 Requires-Python \<4,\>=3.10; 2.7.1 Requires-Python \<4,\>=3.10; 3.0.0b1 Requires-Python \>=3.10
> ERROR: Could not find a version that satisfies the requirement blosc2\>=3.0.0b4 (from versions: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.1, 0.5.2, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 2.0.0, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.5.0, 2.5.1)
> ERROR: No matching distribution found for blosc2\>=3.0.0b4
> \`\`\`
