Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

Installing Python QuantLib: DLL load failed: The specified module could not be found

I'm trying to install QuantLib. The install seems to complete successfully, but when I then try and import it, I get an error message which says:

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

I'm downloading from pypi, saving it to my PC, and then using !pip install filepath, to do the install. I've tried installing QuantLib versions 1.21, 1.20, 1.18. Got the same error in all 3.

I'm using Spyder in Anaconda.

Would anyone know how to fix this?

question from:https://stackoverflow.com/questions/65866714/installing-python-quantlib-dll-load-failed-the-specified-module-could-not-be-f

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You might have a broken installation still in your system.

Try running a small test: Create a new environment and install QuantLib there.

conda create --name test python=3.8
conda activate test
pip install QuantLib
echo import QuantLib as ql; print(ql.__version__) > test.py
python test.py

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...