1
$\begingroup$

I intalled quantlib using "pip install QuantLib" and now I'm getting the below error. I'm using windows 10 and Spyder IDE. I don't see any dll file called _QuantLib, only _QuantLib.cp37-win_amd64.pyd.

File "C:\Conda\lib\site-packages\QuantLib\QuantLib.py", line 13, in from . import _QuantLib

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

$\endgroup$
4
  • $\begingroup$ Can you try pip freeze to see which version you have? I recommend uninstalling, and making sure you don't have QuantLib-Python installed as well, then reinstall $\endgroup$
    – StackG
    Commented Nov 14, 2020 at 4:28
  • $\begingroup$ Yes, I had both installed QuantLib-Python 1.18 and QuantLib 1.2. I uninstalled QuantLib-Python but i'm still getting the same error. $\endgroup$
    – pkto09
    Commented Nov 14, 2020 at 18:11
  • $\begingroup$ Which version/versions of python do you have installed, maybe they are clashing? Can you try 'which python' and 'which python3' (or Windows equivalent) to see what is running? Or I guess your IDE will have a box somewhere that tells you which python interpretor it is using? $\endgroup$
    – StackG
    Commented Nov 17, 2020 at 23:53
  • $\begingroup$ I ran dependency walker and it determined I was missing vcruntime140_1.dll so I copied it from another folder into windows/system32 and it works now. $\endgroup$
    – pkto09
    Commented Dec 19, 2020 at 16:39

2 Answers 2

1
$\begingroup$

This seems to be an issue with QuantLib 1.2. Downgrading to 1.19 solved it for me.

$\endgroup$
0
$\begingroup$

Check your version of the MSVC redistributable, that error usually occurs when the QuantLib binaries load and can't find the right version of MSVC runtime

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.