qd-cae/qd-cae-python

qd.cae.dyna import error

kcyum opened this issue · 4 comments

kcyum commented

Hi.
I meet the error When I import qd.cae.dyn
I already install qd package using pip and visual c++ 2017 redistributable.
I use the win10(64bit), python 3.7.3
Error message is below.
---Error message -----------------------------------------
Traceback (most recent call last):
File "C:\PYTHON37\lib\site-packages\qd\cae\dyna.py", line 4, in
from .dyna_cpp import *
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#1>", line 1, in
import qd.cae.dyna
File "C:\PYTHON37\lib\site-packages\qd\cae\dyna.py", line 7, in
"Could not import C++ Submodule dyna_cpp with error message: %s." % str(err))
ImportError: Could not import C++ Submodule dyna_cpp with error message: DLL load failed: The specified module could not be found.

How do I fix this error?

thank you.

kcyum commented

I just fix it.

  1. I change the python version from 3.7.1 to 3.6.8
  2. I install the Visual studio 2017
  3. I install new qd package that lasso-codie uploaded.
    file name is qd-0.8.0-cp36-cp36m-win_amd64.whl

but I don't know exactly what main problem is. ^^;;;;

thank you.
https://files.pythonhosted.org/packages/a3/53/8aa4a8110fb908c30ede83d8472a128227cf459126719c9875c57865fd31/qd-0.8.0-cp36-cp36m-win_amd64.whl (1.7MB)

Hmmm, I compile the code with the newest versions of Visual Studio, but sometimes there are dll dependencies missing on the system. The redistributional "should" have worked, so I'm as confused as you are. Btw you can check for such issues with Dependency Walker, which shows you what dll another dll is depending on and which one is missing.
Glad anyways you could figure it out on your own more or less, though I don't like it that people have to install the monster Visual Studio in order to make it work ... Let me know in case you track down the issue further, I think many people would profit from your whisdom 👍

RWBos commented

I had the same issue as stated before, using the dependency walker found out that two DLL's were missing (libifcoremd.dll and libmmd.dll). Installing the intel fortran redistributable package seems to solve the issue for me.

Thanks for the info. Depending how the OS is set up, it often also uses the libs from numpy. But there is a good reason why it's professionally called 🔥 DLL Hell 🔥.