Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HyperionCore opened this issue Mar 18, 2024 · 4 comments

Comments

@HyperionCore
Copy link

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

@KrisThielemans
Copy link
Collaborator

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.

@HyperionCore
Copy link
Author

@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?

@KrisThielemans
Copy link
Collaborator

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?

@KrisThielemans
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants