[SciPy-user] import problem on OSX
Nils Wagner
nwagner at iam.uni-stuttgart.de
Wed Aug 1 11:50:03 EDT 2007
Bryan Van de Ven wrote:
> Different import, same module:
>
> In [1]: import scipy
>
> In [2]: scipy.__version__
> Out[2]: '0.5.3.dev3217'
>
> In [3]: from scipy import *
> ---------------------------------------------------------------------------
> <type 'exceptions.ImportError'> Traceback (most recent call last)
>
> /usr/local/scipy/<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>()
> 19 arange, shape, intc
> 20 import numpy
> ---> 21 from scipy.sparse.sparsetools import cscmux, csrmux, \
> 22 cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
> 23 densetocsr, csrtodense, \
>
> <type 'exceptions.ImportError'>: cannot import name cscmux
>
>
> Stefan van der Walt wrote:
>
>> Hi Bryan
>>
>> On Wed, Aug 01, 2007 at 09:04:45AM -0500, Bryan Van de Ven wrote:
>>
>>> 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'
>>>
>> We are now at r3217. Would you please update to the latest SVN
>> version and try again?
>>
>> Cheers
>> Stéfan
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>
>>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
Python 2.5 (r25:51908, May 25 2007, 16:11:33)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.__version__
'0.5.3.dev3217'
>>> from scipy import *
>>>
I cannot reproduce your problem.
It might be a good idea to remove scipy from site-packages and reinstall it.
Nils
More information about the SciPy-User
mailing list