Every time I try to use Uniform Remesh in the Surface Toolbox, I get this error:
[Python] Failed to compute output model: DLL load failed while importing _clustering: The specified module could not be found.
Traceback (most recent call last):
File “C:/Users/kucerabi/Desktop/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SurfaceToolbox.py”, line 278, in onApplyButton
self.logic.applyFilters(self.parameterNode)
File “C:/Users/kucerabi/Desktop/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SurfaceToolbox.py”, line 579, in applyFilters
SurfaceToolboxLogic.remesh(outputModel, outputModel,
File “C:/Users/kucerabi/Desktop/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SurfaceToolbox.py”, line 404, in remesh
if not SurfaceToolboxLogic.installRemeshPrerequisites():
File “C:/Users/kucerabi/Desktop/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SurfaceToolbox.py”, line 387, in installRemeshPrerequisites
import pyacvd
File "C:\Users\kucerabi\Desktop\Slicer 5.6.2\lib\Python\Lib\site-packages\pyacvd_init.py", line 3, in
from pyacvd.clustering import Clustering
File “C:\Users\kucerabi\Desktop\Slicer 5.6.2\lib\Python\Lib\site-packages\pyacvd\clustering.py”, line 16, in
from pyacvd import _clustering
ImportError: DLL load failed while importing _clustering: The specified module could not be found.
Why am I getting this? What can I do to resolve it?
Unfortunately, pyacvd developers broke their package in their 0.3.0 version by adding C code that needs to be compiled and it is only compatible with VTK hosted on PyPI. I’ve submitted an issue to their tracker, but since probably they will not fix this for a long time, I’ll add a version restriction to only use pyacvd<0.3.
In the meantime, you can fix the issue by executing slicer.util.pip_install("pyacvd<0.3") in the Slicer Python console.
Thank you, this information is very useful. I’ve noticed a difference between pyacvd-0.2 and pyacvd-0.3: the .pyd file in the more recent version uses OpenMP.
To test if this is indeed causing the incompatibility of pyacvd-0.3 with your computer, would you mind do these steps:
-install pyacvd-0.3.0 by runnning this in the Slicer Python console: pip_install('pyacvd==0.3.0')
-download libomp140.x86_64.dll library (if you want to learn more about this file, see [1] or [2])
-copy the downloaded libomp140.x86_64.dll to the folder: C:\Users\kucerabi\Desktop\Slicer 5.6.2\lib\Python\Lib\site-packages\pyacvd\
-test if uniform remeshing works and let us know here!