A couple of things:
1. I highly recommend using the latest version of GTSAM (the develop branch on github). It has a bunch of fixes and updates to the IMUFactor code and examples. The ImuFactorExample2.py file has been renamed to ImuFactorISAM2Example.py.
2. I cannot reproduce the Indeterminate Linear System (ILS) error in the basic example. However, you will encounter the ILS error if you try to compute marginals because this example is inherently underconstrained. Ideally, you would also have some external measurements (such as landmarks or GPS) to further constrain the problem. Take a look at ImuFactorsExample.cpp for information on adding GPSFactors. If you need help understanding that example, you can respond to this message. :)