[SciPy-user] Plotting an array

Louis Pecora pecora at anvil.nrl.navy.mil
Tue Oct 10 13:17:45 CDT 2006


Gael Varoquaux wrote:
>     Hi,
>
> Can you give a complete minimum example that does not work. If I put the
> following code in a file and run python on it, I get the expected result.
>
> from scipy import *
> from pylab import *
> t = arange(0, 2.0, 0.1)
> y = sin(2*pi*t)
> tck = interpolate.splrep(t, y, s=0)
> tnew = arange(0, 2.0, 0.01)
> ynew = interpolate.splev(tnew, tck, der=0)
> plot(t, y, 'o', tnew, ynew)
> show()
>
>
> Gaël
>   

When I do the above I get:

Traceback (most recent call last):
  File "/Users/louispecora/Code/python/test_folder/junk.py", line 18, in ?
    from scipy import *
  File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", 
line 5, in ?
    from linsolve import *
  File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/linsolve.py", 
line 1, in ?
    from scipy.sparse import isspmatrix_csc, isspmatrix_csr, isspmatrix, 
spdiags
  File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", 
line 5, in ?
    from sparse import *
  File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
line 12, in ?
    import sparsetools
ImportError: Failure linking new module: 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: 
Library not loaded: /usr/local/lib/libg2c.0.dylib
  Referenced from: 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so
  Reason: image not found


I am missing sparsetools.so.   But I installed the SciPy superpack.  Is 
sparsetools.so not in that?

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  pecora at anvil.nrl.navy.mil



More information about the SciPy-user mailing list