# Failed to upgrade TotalSegmentator

**URL:** <https://discourse.slicer.org/t/failed-to-upgrade-totalsegmentator/40954>\
**Category:** Support\
**Tags:** totalsegmentator\
**Created:** [January 5, 2025, 3:37am UTC](https://discourse.slicer.org/t/failed-to-upgrade-totalsegmentator/40954 "2025-01-05T03:37:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Young](https://avatars.discourse-cdn.com/v4/letter/y/258eb7/32.png) [@Young](https://discourse.slicer.org/u/Young)\
**Post date:** [January 5, 2025, 3:37am UTC](https://discourse.slicer.org/t/failed-to-upgrade-totalsegmentator/40954/1 "2025-01-05T03:37:39Z")

</div>

I installed the TotalSegmentator extension using 3Dslicer version 5.6.2. The first time I used it, I was unable to update TotalSegmentator when installing the python package. The following is the error code displayed. How can I solve this problem

[Python] Failed to upgrade TotalSegmentator

[Python] Command ‘[‘C:/Users/Young/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘-m’, ‘pip’, ‘install’, ‘black;extra’, ‘==’, ‘dev’]’ returned non-zero exit status 2.

Traceback (most recent call last):

File “C:/Users/Young/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 319, in onPackageUpgrade

self.logic.setupPythonRequirements(upgrade=True)

File “C:/Users/Young/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 819, in setupPythonRequirements

self.pipInstallSelective(‘nnunetv2’, nnunetRequirement, packagesToSkip)

File “C:/Users/Young/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 706, in pipInstallSelective

slicer.util.pip\_install(requirement)

File “C:\Users\Young\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3887, in pip\_install

\_executePythonModule(“pip”, args)

File “C:\Users\Young\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3848, in \_executePythonModule

logProcessOutput(proc)

File “C:\Users\Young\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3814, in logProcessOutput

raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)

subprocess.CalledProcessError: Command ‘[‘C:/Users/Young/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘-m’, ‘pip’, ‘install’, ‘black;extra’, ‘==’, ‘dev’]’ returned non-zero exit status 2.
