Install Anaconda 4.3.1 (link), then open a Command Prompt as Admin and type:

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.

Answer from PvK on Stack Overflow
🌐
Quantlib
quantlib.org › install › windows-python.shtml
QuantLib-Python Installation on Windows
set QL_DIR=C:\local\QuantLib-1.36 set INCLUDE=C:\local\boost_1_86_0 · You'll need to install a few Python modules. It's good practice to install them in a new virtual environment, to avoid possible conflicts with your system Python installation. This also helps in case you have multiple versions of Python on your machine.
🌐
Quantlib
quantlib.org › install › linux-python.shtml
QuantLib-Python Installation on Linux
sudo apt-get install python3-dev Similar packages should be available for most other distributions. Contrary to popular belief, working from a released tarball doesn't require you to have SWIG installed. You can download released QuantLib-SWIG versions from GitHub at https://github.com/lba...
🌐
PyPI
pypi.org › project › QuantLib
QuantLib · PyPI
pip install QuantLib Copy PIP instructions · Latest version · Released: Apr 17, 2026 · Python bindings for the QuantLib library · These details have been verified by PyPI · lballabio · These details have not been verified by PyPI · Homepage ...
      » pip install QuantLib
    
Published   Apr 17, 2026
Version   1.42.1
🌐
Quantlib
quantlib.org › install.shtml
QuantLib Installation
Compilation instructions are available for Microsoft Visual C++, Mac OS X and Linux/Unix. Alternatively, you can build QuantLib on all platforms following the CMake build instructions. Instructions for creating a Python wheel are available for Windows, Mac OS X and Linux/Unix.
🌐
Quantlib
quantlib.org › install › macosx-python.shtml
QuantLib-Python Installation on Mac OS X
Once you have activated the Python environment you want to use, make sure you have the latest version of pip by running: ... If a wheel is available for your system (which is likely) it will be installed and you will be able to leave this page and use it right away; if not, you'll have to compile it yourself as described in the next section. The following assumes that you already installed QuantLib; instructions are available at https://www.quantlib.org/install/macosx.shtml.
🌐
PyPI
pypi.org › project › QuantLib-Python
QuantLib-Python · PyPI
This module is provided for backward compatibility. Use “pip install QuantLib” instead.
      » pip install QuantLib-Python
    
Published   Mar 23, 2020
Version   1.18
🌐
Readthedocs
quantlib-python-docs.readthedocs.io › en › latest › getting_started › installation.html
Installation — QuantLib-Python Documentation 1.40 documentation
A working Python 3 installation (Python 3.8+ recommended). Create and activate an isolated environment before installing packages in Linux: ... If you use conda, the conda-forge channel typically provides QuantLib packages.
Find elsewhere
🌐
Anaconda.org
anaconda.org › conda-forge › quantlib-python
quantlib-python - conda-forge | Anaconda.org
Install quantlib-python with Anaconda.org. The python wrapper of QuantLib.
🌐
Quantlib
quantlib.org › download.shtml
QuantLib Download Page
Official binary distributions are available for Python and C#; these should be preferred, unless you want to modify the library. Wheels are available for all common platforms and a few less common ones. To install QuantLib in your (virtual) environment, run:
🌐
Medium
pankajsh.medium.com › installing-quantlib-and-quantlib-python-on-windows-e9571ece4b02
Installing QuantLib and QuantLib-Python on Windows | by Pankaj Sharma | Medium
May 9, 2021 - You can go with either Option 1 or Option2 to build a Python package. Option 2 appears quicker, but both work. At the end you should see the QuantLib library in your site-packages folder. Hope this writeup helps anyone who is stuck on installing QuantLib-Python on windows.
🌐
Modelmania
modelmania.github.io › main › Files › Misc › QuantLib_Python.html
Python QuantLib-SWIG Guide
Run "Anaconda Prompt" from Start Menu. In the console window, goto directory "C:\QuantLib-SWIG-1.8\Python" and set the following environment variables: ... python setup.py install Or you may want to create a distribution package (msi file) by issuing command:
🌐
Wordpress
jrvcomputing.wordpress.com › 2015 › 07 › 03 › 43
Installing QuantLib-Python Quantitative Finance Library in Windows – Prof. Jayanth R Varma's blog on computing
December 25, 2019 - Even if we want a later version than what is there in the repositories, building QuantLib-Python from source is quite straightforward – the usual ./configure, make, sudo make install dance works nicely for QuantLib and installing the Python part is just a question of running setup.py.
🌐
Back of the Envelope
vineetv.wordpress.com › 2020 › 05 › 11 › quantlib-1-18
Installing QuantLib 1.18 and QuantLib-Python – Back of the Envelope
June 6, 2020 - The following steps should install the companion version of QuantLib-Python module. The path to Python interpreter would depend on the system installation in use.
🌐
Stack Overflow
stackoverflow.com › questions › 56729597 › install-quantlib-python-and-use-it-in-jupyter-in-linux
Install quantlib-python and use it in jupyter in Linux - Stack Overflow
Navigate into the quantlib-swig directory, if you have boost, quantlib installed and in their default directories, you can simply run: python setup.py wrap python setup.py build python setup.py install
🌐
Anaconda
anaconda.org › jholdom › quantlib-python
Quantlib Python | Anaconda.org
To install this package run one of the following: conda install jholdom::quantlib-python
🌐
Quantlib
quantlib.org › docs.shtml
QuantLib Documentation
Goutham Balaraman and Luigi Ballabio, QuantLib Python Cookbook Available as an ebook from Leanpub. Vasily Nekrasov, Notes on Getting Started with QuantLib (unfinished) Available from his web site. The QuantLib Notebooks is a series of screencasts by Luigi Ballabio, using Jupyter notebooks to demonstrate features of the QuantLib library. Introduction to QuantLib is another series of screencasts by Felix Lee, covering installation ...
Top answer
1 of 5
17

At this time, there's no specific documentation for QuantLib-Python, except for a series of screencasts that I started a while ago (you can find them on YouTube at https://www.youtube.com/playlist?list=PLu_PrO8j6XAvOAlZND9WUPwTHY_GYhJVr) but which is far from exhaustive; there's just a few of them for now, and there's no definite learning path.

However, the structure of the library in Python is the same as in C++, except for some changes (like the use of std::shared_ptr in C++ being hidden in Python) that were made so that one could write more idiomatic Python code. Therefore, you should be able to use the resources listed on the QuantLib site at http://quantlib.org/docs.shtml and translate their advice to the corresponding Python code.

One thing you might run into is that not all of QuantLib is exported to Python. Again, there's no documentation of what's there; so when in doubt, search for a feature inside the SWIG interface files to check if it's exported.

Update: last year, Goutham and I have pooled our material and published the QuantLib Python Cookbook. It's still a work in progress, but it might already be useful.

Further update: as of the end of 2024, A QuantLib Guide is also available.

2 of 5
11

You will find a tutorial of QuantLib using python with simple examples here:

http://gouthamanbalaraman.com/blog/quantlib-python-tutorials-with-examples.html

I have been writing these as a means to be instructive to others going through the process of learning and working with QuantLib. If you have suggestions on what topics you would like to read, please post a comment.

🌐
Elite Trader
elitetrader.com › et › threads › needing-help-installing-quantlib-for-python-on-windows-machine.346015
Needing Help installing QuantLib for Python on Windows machine | Elite Trader
June 10, 2020 - I am a R user, but trying to venture into Python primarily for using canned scripts for calibrating the Heston Model which uses Quantlib. I am...