[SciPy-User] scipy.spatial module import errors

Warren Weckesser warren.weckesser@enthought....
Thu Mar 29 23:46:00 CDT 2012


On Thu, Mar 29, 2012 at 9:06 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

>  Hi,
>
> I'm using EPD 7.2  on mac OSX lion:
>
> In [8]: scipy.__version__
> Out[8]: '0.10.0'
>
> When I attempt to load the spatial module. I am using spyder  and with
> >>>  scipy.spatial(
>
> I get the  docstrings.
>
> When I try to load like this:
>
> >>> kd=scipy.spatial.cKDTree(block,1000)
>
> i get:
>
> ---------------------------------------------------------------------------
> AttributeError                            Traceback (most recent call last)
> /Users/peter/src/spyderlib/<ipython-input-6-cfb06daebc25> in <module>()
> ----> 1 kd=scipy.spatial.cKDTree(block,1000)
>
> AttributeError: 'module' object has no attribute 'spatial'
>
> Can anyone suggest what might be going on, and or a solution?
>
> Thanks!
>
> Peter
>
>

'scipy' is actually a collection of subpackages.  The subpackages are not
imported by executing 'import scipy'.  You'll have to explicitly import the
scipy.spatial package with 'import scipy.spatial'.

Warren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120329/ca2979ef/attachment.html 


More information about the SciPy-User mailing list