scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
455 stars 122 forks source link

Fails from pyearth import Earth #117

Closed LorenzoBottaccioli closed 8 years ago

LorenzoBottaccioli commented 8 years ago

Hi,

If I try to import Earth I get this error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-061fadd46d38> in <module>()
----> 1 from pyearth import Earth

/usr/local/lib/python2.7/dist-packages/py_earth-0.1.0-py2.7-linux-x86_64.egg/pyearth/__init__.py in <module>()
      6 
      7 from ._version import __version__
----> 8 from .earth import Earth

/usr/local/lib/python2.7/dist-packages/py_earth-0.1.0-py2.7-linux-x86_64.egg/pyearth/earth.py in <module>()
----> 1 from ._forward import ForwardPasser
      2 from ._pruning import PruningPasser
      3 from ._util import ascii_table, apply_weights_2d, gcv
      4 from ._types import BOOL
      5 from sklearn.base import RegressorMixin, BaseEstimator, TransformerMixin

/home/lorenzo/pyearth/_qr.pxd in init pyearth._forward (pyearth/_forward.c:27092)()
      2 from _types cimport FLOAT_t, INT_t, INDEX_t, BOOL_t
      3 
----> 4 cdef class UpdatingQT:
      5     cdef readonly int m
      6     cdef readonly int max_n

/home/lorenzo/pyearth/_qr.pyx in init pyearth._qr (pyearth/_qr.c:22631)()

ImportError: No module named cython_lapack

Any suggestion?

mehdidc commented 8 years ago

Hello,

do you have scipy installed ? in case you don't, it should work after a "pip install scipy" or "conda install scipy" in case you have anaconda.

jcrudy commented 8 years ago

In addition to making sure you have scipy, you should also check that your scipy version is at least 0.16.0.

jcrudy commented 8 years ago

I'm closing this because I suspect it was just an issue with installing scipy. @LorenzoBottaccioli if you're still having problems please comment or reopen.