[SciPy-User] error import scipy.spatial

josef.pktd@gmai... josef.pktd@gmai...
Wed Jan 27 09:45:47 CST 2010


On Wed, Jan 27, 2010 at 2:59 AM,  <markus.proeller@ifm.com> wrote:
>
> Hi,
>
> I get an error message when importing scipy.spatial:
>
>>>> import scipy.spatial
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in <module>
>   File "C:\Python26\lib\site-packages\scipy\spatial\__init__.py", line 7, in
> <module>
>     from ckdtree import *
>   File "numpy.pxd", line 30, in scipy.spatial.ckdtree
> (scipy\spatial\ckdtree.c:6087)
> ValueError: numpy.dtype does not appear to be the correct type object
>
> when I try to import it again, it seems to work:
>>>> import scipy.spatial
>>>> scipy.spatial.distance.cdist(array([[0,0,0]]),array([[1,1,1]]))
> array([[ 1.73205081]])
>
> Any idea?


scipy 0.7.x has binary incompatibility problems if it has been
compiled against numpy 1.3 and is run against numpy 1.4

There are 3 options, either you recompile scipy against numpy 1.4., or
downgrade to numpy 1.3 until numpy 1.4 compatible scipy binaries are
available, or hope that you don't run into a case where python crashes.

More details are in several threads on the mailing lists.

Josef

>
> Markus
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list