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 OverflowVideos
» pip install QuantLib
» pip install QuantLib-Python
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.
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.
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.
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.