I am getting a import error?

asked 11 years ago

naren gravatar image

updated 11 years ago

vdelecroix gravatar image

I have recently shifted to python from Matlab. I have tried installing a toolbox SPAMS(sparse modelling software) using sage --python. When I try to import spams module it gives

>>> import spams
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2eecc34cc6d3> in <module>()
----> 1 import spams

/opt/spams-python/spams.py in <module>()
      5 
----> 6 import spams_wrap
      7 import numpy as np

/opt/spams-python/spams_wrap.py in <module>()
     30             return _mod
---> 31     _spams_wrap = swig_import_helper()
     32     del swig_import_helper

/opt/spams-python/spams_wrap.py in swig_import_helper()
     22         except ImportError:
---> 23             import _spams_wrap
     24             return _spams_wrap

ImportError: /opt/sage-5.9.beta5/local/lib/liblapack.so: undefined symbol: cblas_zswap

I know ATLAS, LAPACK and BLAS are already present in the stage installation.

Kindly help me resolve this issue. Any help will be appreciated.

Cheers, Naren

Preview: (hide)

Comments

Did you follow the installation instructions for SPAMS as in section 2 of [the SPAMS documentation](http://spams-devel.gforge.inria.fr/doc-python/doc_spams.pdf), but replacing python setup.py install --prefix=your-installation-dir by sage --python setup.py install --prefix=your-installation-dir ?

slelievre gravatar imageslelievre ( 11 years ago )

Yeah I did. I have replaced "python" by "sage --python"

naren gravatar imagenaren ( 11 years ago )

Yeah I did. I have replaced "python" by "sage --python" It didn't show any error when I installed it but it reported the ImportError when tried "import spams" in sage notebook.

naren gravatar imagenaren ( 11 years ago )

Can anyone please help me with this problem!

naren gravatar imagenaren ( 11 years ago )

Hi, I edited your post with the (almost) complete Traceback that I was able to reproduce on my computer. The error is quite strange. You perhpas would ask your question on sage-support (https://groups.google.com/group/sage-support) with a link to this post.

vdelecroix gravatar imagevdelecroix ( 11 years ago )