Thanks for the pointers guys. I ran the line of code I was having trouble with inside my virtual environment (in Anaconda Continuum). I did some gdb debugging as advised and got this result:
(foo)ben@debi:~$ gdb --args python -c "import statsmodels.api as sm"
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ben/anaconda/envs/foo/bin/python...done.
(gdb) run
Starting program: /home/ben/anaconda/envs/foo/bin/python -c import\ statsmodels.api\ as\ sm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6aae1a0 in PyArray_API ()
from /home/ben/anaconda/envs/foo/lib/python2.7/site-packages/numpy/core/multiarray.so
I got some advise on Anaconda google group and it was mentioned that the fault lies with linalg as seen below:
ben@debi:~$ gdb --args python -c "import scipy.linalg as la; la.test()"
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ben/anaconda/bin/python.
..done.
(gdb) run
Starting program: /home/ben/anaconda/bin/python -c import\ scipy.linalg\ as\ la\;\ la.test\(\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Running unit tests for scipy.linalg
NumPy version 1.7.1
NumPy is installed in /home/ben/anaconda/lib/python2.7/site-packages/numpy
SciPy version 0.13.2
SciPy is installed in /home/ben/anaconda/lib/python2.7/site-packages/scipy
Python version 2.7.6 |Anaconda 1.8.0 (64-bit)| (default, Nov 11 2013, 10:47:18) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
nose version 1.3.0
............................................................................0-th dimension must be fixed to 3 but got 15
..0-th dimension must be fixed to 3 but got 5
..................................K..............................................................................................................................................................................................................................................................................................K....................................................................................................................................................................
Program received signal SIGSEGV, Segmentation fault.
0x00007fffede7d3c8 in master.0.id_srand_ ()
from /home/ben/anaconda/lib/python2.7/site-packages/scipy/linalg/_interpolative.so
..so i guess this fault did not come from statsmodels.api then?