python-sparse: ImportError: No module named sparse (from pysparse.sparse import spmatrix)
I am having trouble installing pysparse on ubuntu. I installed the package python-sparse, but when running the example code found in the documentation
from pysparse.sparse import spmatrix
from pysparse.direct import superlu
import numpy
n = 100
A = poisson2d_
b = numpy.ones(n*n)
x = numpy.empty(n*n)
LU = superlu.
LU.solve(b, x)
I get the error message
Traceback (most recent call last):
File "sparse2.py", line 1, in <module>
from pysparse.sparse import spmatrix
ImportError: No module named sparse
I have also tried running
$ pip install pysparse
Requirement already satisfied: pysparse in /usr/lib/
Installing collected packages: pysparse
Successfully installed pysparse
Why does the example code from the documentation not work?
Thanks!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask numpy.problem@gmail.com for more information if necessary.