[SciPy-dev] Import strategy

Nils Wagner nwagner at mecha.uni-stuttgart.de
Mon Jan 9 04:40:23 CST 2006

Pearu Peterson wrote:
>On Mon, 9 Jan 2006, Nils Wagner wrote:
>>Traceback (most recent call last):
>> File "import.py", line 5, in ?
>>   a_logm = linalg.logm(a)
>>AttributeError: 'module' object has no attribute 'logm'
>What linalg module are you using in import.py? May be it comes from
>numpy? How do you import scipy/numpy in import.py?
>>>>from scipy import *
><function logm at 0x40cf08ec>
>works fine here.
>Scipy-dev mailing list
>Scipy-dev at scipy.net
Strange. Here I get

from scipy import *
Overwriting linalg=<module 'scipy.basic.linalg' from
'/usr/local/lib/python2.4/site-packages/scipy/basic/linalg.pyc'> from
/usr/local/lib/python2.4/site-packages/scipy/basic/linalg.pyc (was
<module 'scipy.linalg' from
'/usr/local/lib/python2.4/site-packages/scipy/linalg/__init__.pyc'> from
Overwriting fftpack=<module 'scipy.basic.fftpack' from
'/usr/local/lib/python2.4/site-packages/scipy/basic/fftpack.pyc'> from
/usr/local/lib/python2.4/site-packages/scipy/basic/fftpack.pyc (was
<module 'scipy.fftpack' from
from /usr/local/lib/python2.4/site-packages/scipy/fftpack/__init__.pyc)
>>> linalg.logm
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'logm'
>>> import numpy
>>> numpy.__version__
>>> import scipy
>>> scipy.__version__

BTW, I haven't uninstalled the "old" core but installed numpy.


More information about the Scipy-dev mailing list