[SciPy-user] import problem on OSX

Bryan Van de Ven bryanv@enthought....
Wed Aug 1 09:04:45 CDT 2007


We have some demos that do "from scipy import *" in order to let users 
enter arbitrary expressions to be evaluated on the fly. This fails on 
OSX. I just wanted to make sure it's nothing I have done before filing a 
ticket. It cannot import densetocsr:

In [1]: import scipy

In [2]: scipy.__version__
Out[2]: '0.5.3.dev3015'

In [3]: form scipy import *
------------------------------------------------------------
    File "<ipython console>", line 1
      form scipy import *
               ^
<type 'exceptions.SyntaxError'>: invalid syntax


In [4]: from scipy import *
---------------------------------------------------------------------------
<type 'exceptions.ImportError'>           Traceback (most recent call last)

/Users/bryan/workspace/enthought_branches/enthought.chaco2_2.0/examples/<ipython 
console> in <module>()

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linsolve/__init__.py 
in <module>()
       3 from info import __doc__
       4
----> 5 import umfpack
       6 __doc__ = '\n\n'.join( (__doc__,  umfpack.__doc__) )
       7 del umfpack

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linsolve/umfpack/__init__.py 
in <module>()
       2
----> 3 from umfpack import *
       4
       5 __all__ = filter(lambda s:not s.startswith('_'),dir())
       6 from numpy.testing import NumpyTest

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linsolve/umfpack/umfpack.py 
in <module>()      9 #from base import Struct, pause
      10 import numpy as nm
---> 11 import scipy.sparse as sp
      12 import re, imp
      13 try: # Silence import error.

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/sparse/__init__.py 
in <module>()
       3 from info import __doc__
       4
----> 5 from sparse import *
       6
       7 __all__ = filter(lambda s:not s.startswith('_'),dir())

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/sparse/sparse.py 
in <module>()
      13                   arange, shape, intc
      14 import numpy
---> 15 from scipy.sparse.sparsetools import densetocsr, csrtocsc, 
csrtodense, \
      16      cscplcsc, cscelmulcsc, cscmux, csrmux, csrmucsr, csrtocoo, 
cootocsc, \
      17      cootocsr, cscmucsc, csctocoo, csctocsr, csrplcsr, csrelmulcsr

<type 'exceptions.ImportError'>: cannot import name densetocsr

In [5]:


More information about the SciPy-user mailing list