UCL/STIR

ImportError: DLL load failed while importing _stir: The specified module could not be found.

HyperionCore opened this issue · 5 comments

this occurs after installation by Conda, and import stir

I see a similar issue marked closed, but still dont know how to solve it.

C:\Users\sduha\anaconda3\envs\dicomviewer310\python.exe D:\PycharmProjects\DicomViewer\STIR\STIR\examples\python\projector_demo.py
Traceback (most recent call last):
File "D:\PycharmProjects\DicomViewer\STIR\STIR\examples\python\projector_demo.py", line 15, in
import stir
File "D:\PycharmProjects\DicomViewer\STIR\STIR\examples\python\stir.py", line 12, in
from _stir import *
ImportError: DLL load failed while importing _stir: The specified module could not be found.

Process finished with exit code 1

Please check conda-forge/stir-feedstock#106. It contains some ways to diagnose and ways to solve the problem. Apologies for this. Let us know.

@KrisThielemans thanks for the help, looks like it is related to _stir.pyd file can not be found correctly, I tried to add the path of _stir.pyd into code, but still not work, I'm wondering if it has sth to do with python version that used to pack the pyd file? what python version is it?

That's unlikely to be it. Conda/conda-forge automatically match python versions, set the path etc. (conda-forge builds a few version of STIR for a few different python versions, but you shouldn't have to worry about that).

Debugging this via python is hard, because its message is not very helpful. Did you try running a STIR executable as in the stir-feedstock issue above?

Hi. I'll close this issue if there are no further updates.