fbpx

Painless instructions on how to build QuantLib SWIG for Python and Ruby bindings in Ubuntu Linux

(Last Updated On: June 2, 2010)

Painless instructions on how to build QuantLib SWIG for Python and Ruby bindings in Ubuntu Linux

Getting Quantlib SWIG to work properly is a real pain in the ass. First, if you go to Sourceforge, you will not find QuantLib SWIG at all. When you attempt to check out using SVN, you will find the particular version will not contain the required configure program to set up your Linux environment. Again, I am using Ubuntu Linux.
Thankfully, I found an awesome link right from Ubuntu’s website. The link was:
https://launchpad.net/ubuntu/maverick/+source/quantlib-swig
This was easily the most critical link and / or documentation to get this working. Others seem to be inadequate in assuming you are Linux guru to get this working. As you download this one library and tar ball, make sure you install each dependency package list. This includes:
• debhelper (>= 7.0.0)
• g++ (>= 4:4.0)
• gcc (>= 4:4.0)
• libboost-dev (>= 1.34.0)
• libboost-test-dev (>= 1.34.0)
• libquantlib0-dev (>= 1.0.0~20100209)
• python-all-dev (>= 2.3.5-10)
• python-central (>= 0.5)
• ruby
• ruby1.8
• ruby1.8-dev

For each package on the command line, you can use Aptitude to cleanly install. Do as root:
apt-get install (package)
or use as an non root:
sudo apt-get install (package)
From the above link, you should be able to run individually configure, make, and make install.
Within the QuantLib SWIG directory, run:
./configure
make
make install
I do notice that the last two commands will produce Java exceptions of missing directories. This is where I get confused. Anyhow, I tried:

make –C Python at the QuantLib-SWIG-1.0 directory level. I did not running this within the Python sub directory.
There appears to be a step by step blog post at:
http://chicagoquantitativetrading.wordpress.com/
This may help if you still have difficulty.
I am not sure why this has to be this difficult. There is a definite need for the QuantLib SWIG authors to improve this. I will report my results as I get it at it. I want to get the Ruby bindings but will Python as a role model. There appears to be more third party documents for Python.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Subscribe For Latest Updates

Sign up to best of business news, informed analysis and opinions on what matters to you.
Invalid email address
We promise not to spam you. You can unsubscribe at any time.

NOTE!

Check NEW site on stock forex and ETF analysis and automation

Scroll to Top