pythonscikit-learnimporterroratlas

Cannot import sklearn.linear_model


When I try to import sklearn.linear_model, I get this error:

In [1]: from sklearn import linear_model
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a6ebbebad697> in <module>()
----> 1 from sklearn import linear_model

/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/__init__.py in <module>()
     15 from .least_angle import (Lars, LassoLars, lars_path, LarsCV, LassoLarsCV,
     16                           LassoLarsIC)
---> 17 from .coordinate_descent import (Lasso, ElasticNet, LassoCV, ElasticNetCV,
     18                                  lasso_path, enet_path, MultiTaskLasso,
     19                                  MultiTaskElasticNet, MultiTaskElasticNetCV,

/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/coordinate_descent.py in <module>()
     27 from ..exceptions import ConvergenceWarning
     28 
---> 29 from . import cd_fast
     30 
     31 

ImportError: /usr/local/lib/python2.7/dist-packages/sklearn/linear_model/cd_fast.so: undefined symbol: ATL_dtger

I know it has something to do with Atlas, but I have no idea what. This exact code used to run smoothly on this very machine, and I do not know of any lib modification/installation.

Thank you.


Solution

  • I solved it, but I'm not sure how. I reinstalled some things. I found out someone had installed Atlas via apt-get, so I removed it and recompiled pretty much everything.