ccc
ccc

Reputation: 303

Installing QuantLib in Anaconda on the Spyder Editor (Windows)

How do I install the QuantLib Package in Anaconda. I have tried the following code;

import QuantLib as ql

but I am getting the following result;

ModuleNotFoundError: No module named 'QuantLib'

Can anyone assist me

Upvotes: 7

Views: 11407

Answers (3)

gregV
gregV

Reputation: 1097

conda install -c conda-forge quantlib does not appear to quite work while it shows a package in conda list as quantlib(note the lower case). The pip installation via python -m pip install QuantLib from Anaconda prompt did the trick for me and import QuantLib as ql runs fine without throwing errors.

see QuantLib-Python installation on Windows for more help.

Upvotes: 2

Pithit
Pithit

Reputation: 471

I used this link download quantlib 1.7.1 to install in Windows 10 (I use Anaconda). It was really smooth and no prob at all.

Upvotes: 2

PvK
PvK

Reputation: 370

You first need to install the QuantLib package. The easiest way I found is to install Anaconda 4.3.1 (link), open a Command Prompt as Admin and run:

pip install QuantLib-Python

For me, this only worked on the latest version of Anaconda including Python 3.6, think the QuantLib-Python package was implemented in PIP only very recently. This might work for other recent installations of Python as well, but it did not work for me on older versions of Anaconda or Python 3.5.

Upvotes: 7

Related Questions