[SciPy-User] First attempt to import scipy.stats fails

josef.pktd@gmai... josef.pktd@gmai...
Tue Mar 9 19:03:14 CST 2010


On Tue, Mar 9, 2010 at 7:08 PM,  <PHobson@geosyntec.com> wrote:
> But the second one works fine -- so it's not really an issue that bothers me, but I thought it might interest some folks. Here's an IPython session that demonstrates the issue:
>
> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
> ...
> IPython 0.10 -- An enhanced Interactive Python.
> ...
> In [1]: import numpy as np
>
> In [2]: import scipy as sp
>
> In [3]: import scipy.stats as st
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call last)
>
> c:\stuff\utils\py\<ipython console> in <module>()
>
> C:\Python26\lib\site-packages\scipy\stats\__init__.py in <module>()
>      5 from info import __doc__
>      6
> ----> 7 from stats import *
>      8 from distributions import *
>      9 from rv import *
>
> C:\Python26\lib\site-packages\scipy\stats\stats.py in <module>()
>    201
>    202 #import scipy.stats  #is this a circular import ?
>
> --> 203 from morestats import find_repeats #is only reference to scipy.stats
>    204 import distributions
>    205
>
> C:\Python26\lib\site-packages\scipy\stats\morestats.py in <module>()
>      5 import statlib
>      6 import stats
> ----> 7 import distributions
>      8 from numpy import isscalar, r_, log, sum, around, unique, asarray
>      9 from numpy import zeros, arange, sort, amin, amax, any, where, \
>
> C:\Python26\lib\site-packages\scipy\stats\distributions.py in <module>()
>     25 from scipy.special import gammaln as gamln
>     26 from copy import copy
> ---> 27 import vonmises_cython
>     28 import textwrap
>     29
>
> c:\stuff\utils\py\numpy.pxd in scipy.stats.vonmises_cython (scipy\stats\vonmises_cython.c:2939)()
>
> ValueError: numpy.dtype does not appear to be the correct type object
>
> In [4]: import scipy.stats as st
>
> In [5]: np.__version__
> Out[5]: '1.4.0'
>
> In [6]: sp.__version__
> Out[6]: '0.7.1'

scipy 0.7.1 is not compatible with numpy 1.4.0

new compatible versions are hopefully out soon. the released scipy
binary is only compatible with numpy 1.3..  scipy needs to be
recompiled to run with numpy 1.4.0,

Josef

>
> Paul M. Hobson
> Senior Staff Engineer
> --
> Geosyntec Consultants
> 55 SW Yamhill St, Ste 200
> Portland, OR 97204
> Phone: 503.222.9518
> www.geosyntec.com
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list