Repository navigation
Closed
Closed
Copy link
Labels
Milestone
Description
After pip install numpy 1.15 from a wheel,
print "np.dtype.__basicsize__:", np.dtype.__basicsize__ # 96
print "scipy.dtype.__basicsize__:", scipy.dtype.__basicsize__ # 96
from scipy import stats
~ 20 RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
(Please add labels, don't see them; is there a label "strange" ?)
A shell script to reproduce this:
#!/bin/bash
# re-install numpy scipy: https://github.com/numpy/numpy/issues/11537 denis 27july
( cd $site; rm -r tmp; mkdir tmp; mv numpy* scipy* tmp )
rm -r ~/Library/Caches/pip
#...............................................................................
pip2 install --user numpy scipy
python2 -c '
import sys
import numpy as np
import scipy
print "versions: numpy %s scipy %s python %s " % (
np.__version__, scipy.__version__ , sys.version )
print "np.dtype.__basicsize__:", np.dtype.__basicsize__
print "scipy.dtype.__basicsize__:", scipy.dtype.__basicsize__
from scipy import stats
'
pip2 --version
ls -l $site/scipy/*/*cython*.so
otool -L $site/scipy/*/*cython*.so # mac
and the logfile:
Collecting numpy
Downloading https://files.pythonhosted.org/packages/3c/bf/e36756c562f7386be78c6942f0a8a647ee4eb374cdf219bece7054832b14/numpy-1.15.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
Collecting scipy
Downloading https://files.pythonhosted.org/packages/d1/d6/3eac96ffcf7cbeb37ed72982cf3fdd3138472cb04ab32cdce1f444d765f2/scipy-1.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.8MB)
Installing collected packages: numpy, scipy
The scripts conv-template, f2py and from-template are installed in '/Users/bz/Library/Python/2.7/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.15.0 scipy-1.1.0
versions: numpy 1.15.0 scipy 1.1.0 python 2.7.15 (v2.7.15:ca079a3ea3, Apr 29 2018, 20:59:26)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
np.dtype.__basicsize__: 96
scipy.dtype.__basicsize__: 96
/Library/Python/2.7/site-packages/scipy/special/__init__.py:640: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._ufuncs import *
/Library/Python/2.7/site-packages/scipy/linalg/basic.py:17: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._solve_toeplitz import levinson
/Library/Python/2.7/site-packages/scipy/linalg/__init__.py:207: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._decomp_update import *
/Library/Python/2.7/site-packages/scipy/special/_ellip_harm.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm
/Library/Python/2.7/site-packages/scipy/interpolate/_bsplines.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _bspl
/Library/Python/2.7/site-packages/scipy/sparse/lil.py:19: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _csparsetools
/Library/Python/2.7/site-packages/scipy/sparse/csgraph/__init__.py:165: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._shortest_path import shortest_path, floyd_warshall, dijkstra,\
/Library/Python/2.7/site-packages/scipy/sparse/csgraph/_validation.py:5: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._tools import csgraph_to_dense, csgraph_from_dense,\
/Library/Python/2.7/site-packages/scipy/sparse/csgraph/__init__.py:167: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._traversal import breadth_first_order, depth_first_order, \
/Library/Python/2.7/site-packages/scipy/sparse/csgraph/__init__.py:169: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._min_spanning_tree import minimum_spanning_tree
/Library/Python/2.7/site-packages/scipy/sparse/csgraph/__init__.py:170: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._reordering import reverse_cuthill_mckee, maximum_bipartite_matching, \
/Library/Python/2.7/site-packages/scipy/spatial/__init__.py:95: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .ckdtree import *
/Library/Python/2.7/site-packages/scipy/spatial/__init__.py:96: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .qhull import *
/Library/Python/2.7/site-packages/scipy/spatial/_spherical_voronoi.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _voronoi
/Library/Python/2.7/site-packages/scipy/spatial/distance.py:122: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _hausdorff
/Library/Python/2.7/site-packages/scipy/optimize/_trlib/__init__.py:1: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._trlib import TRLIBQuadraticSubproblem
/Library/Python/2.7/site-packages/scipy/optimize/_numdiff.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._group_columns import group_dense, group_sparse
/Library/Python/2.7/site-packages/scipy/stats/_continuous_distns.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _stats
pip 18.0 from /Library/Python/2.7/site-packages/pip (python 2.7)
-rwxr-xr-x 1 bz admin 306652 Jul 27 11:34 /Library/Python/2.7/site-packages/scipy/linalg/cython_blas.so
-rwxr-xr-x 1 bz admin 817100 Jul 27 11:34 /Library/Python/2.7/site-packages/scipy/linalg/cython_lapack.so
-rwxr-xr-x 1 bz admin 2738116 Jul 27 11:34 /Library/Python/2.7/site-packages/scipy/special/cython_special.so
/Library/Python/2.7/site-packages/scipy/linalg/cython_blas.so:
@loader_path/../.dylibs/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
@loader_path/../.dylibs/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
@loader_path/../.dylibs/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Library/Python/2.7/site-packages/scipy/linalg/cython_lapack.so:
@loader_path/../.dylibs/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
@loader_path/../.dylibs/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
@loader_path/../.dylibs/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Library/Python/2.7/site-packages/scipy/special/cython_special.so:
@loader_path/../.dylibs/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
@loader_path/../.dylibs/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
@loader_path/../.dylibs/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
Reacted by Mark Mikofski, Susannah Joyce Doss and Xiaoyi Yin
Activity
earwig commentedon Jul 28, 2018
Experiencing this too. The warnings themselves should be benign (see this SO post) but are annoying nonetheless. numpy previously silenced them in __init__.py, but the code to do so was removed in cf46d8c and I'm not sure why. Perhaps it was a mistake? The relevant issue is #10842, which disabled the warnings elsewhere in tests, but I must be missing something, because tests are not the only place those warnings would have shown up.
charris commentedon Jul 28, 2018
I'm not sure the warning is benign, the dtype size hasn't changed in years. I'd like to know where scipy came from.
charris commentedon Jul 28, 2018
OK, looking at this more, I think this is harmless and we should filter the error. Currently it is only filtered for testing.
denis-bz commentedon Jul 29, 2018
Sure, filter. But where's the size 88 in numpy 1.15 coming from --
what changed, if not numpy.dtype: the wheel build chain, .dylibs ?
charris commentedon Jul 29, 2018
How did you install SciPy and NumPy in all those different cases?
earwig commentedon Jul 29, 2018
I can easily reproduce this by installing the binary wheels for macOS or linux from pypi inside a virtualenv. Runtime warnings occur with scipy-1.1.0 and numpy-1.15.0, but not with numpy-1.14.5. See log for macOS: https://gist.github.com/earwig/8d316e6b053ce9e90d3dbdd7c4a0da70.
Now, I'm afraid we may be talking past each other... I do not believe there was any change in numpy to cause this other than the removal of the
warnings.filterwarningscalls in __init__.py in cf46d8c, as I previously mentioned, which is included in 1.15.0 but not 1.14.5. scipy targets numpy-1.8.2 when it builds its binary wheels, and appears to have done so for a long time. In numpy-1.8.2, thenumpy.dtypestructure was different (8 bytes smaller, apparently due to the addition of thehashfield in cca2c1a as part of numpy-1.10.0), but not in an incompatible way.Thank you.
rgommers commentedon Jul 31, 2018
Yes I think this is right. We'll need an 1.15.1 with this fix included. PR is gh-11634, I think it should be merged.
charris commentedon Jul 31, 2018
Closed by #11634.
Install [email protected]
Issue #173: specified upper bound on NumPy version due to the followi…
NoblesseCoder commentedon Aug 3, 2018
I have no issue with scipy 1.1.0 & numpy 1.14.5
rainwoodman commentedon Aug 4, 2018
I thought somehow 1.15 changed the size of dtype -- turns out to be cython. Why is cython not fixed if this warning is a false positive?
charris commentedon Aug 4, 2018
The size has changed, it is not a problem, but cython warns.
fonnesbeck commentedon Aug 10, 2018
This occurs when installed via conda as well.
ChimbuOffical commentedon Aug 10, 2018
Getting similar RuntimeWarning while installing the pandas module. PFB warning messages.
will numpy 1.15.1 will fix this issue.?
mattip commentedon Aug 10, 2018
Yes, 1.15.1 will mask those harmless warnings
Tehsurfer commentedon Aug 15, 2018
I'm getting this warning when using numpy with flask and even though it does appear to be harmless I believe it is the culprit suppressing all of my server's debugging output and print statements which is not the nicest development environment.
(in ubuntu linux on AWS using numpy 1.15.0 and flask 1.0.2 in python 2.7.12 )
$ sudo python2 server.py /home/ubuntu/.local/lib/python2.7/site-packages/pandas/_libs/__init__.py:4: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime /home/ubuntu/.local/lib/python2.7/site-packages/pandas/__init__.py:26: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (hashtable as _hashtable, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/dtypes/common.py:6: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos, lib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/util/hashing.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import hashing, tslib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/indexes/base.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (lib, index as libindex, tslib as libts, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/tseries/offsets.py:21: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.tslibs.offsets as liboffsets /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/ops.py:16: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos as libalgos, ops as libops /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/indexes/interval.py:32: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs.interval import ( /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/internals.py:14: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import internals as libinternals /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/sparse/array.py:33: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.sparse as splib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/window.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.window as _window /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/groupby/groupby.py:68: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (lib, reduction, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/reshape/reshape.py:30: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos as _algos, reshape as _reshape /home/ubuntu/.local/lib/python2.7/site-packages/pandas/io/parsers.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.parsers as parsers /home/ubuntu/.local/lib/python2.7/site-packages/pandas/io/pytables.py:50: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos, lib, writers as libwriters /home/ubuntu/.local/lib/python2.7/site-packages/pandas/_libs/__init__.py:4: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime /home/ubuntu/.local/lib/python2.7/site-packages/pandas/__init__.py:26: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (hashtable as _hashtable, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/dtypes/common.py:6: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos, lib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/util/hashing.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import hashing, tslib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/indexes/base.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (lib, index as libindex, tslib as libts, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/tseries/offsets.py:21: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.tslibs.offsets as liboffsets /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/ops.py:16: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos as libalgos, ops as libops /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/indexes/interval.py:32: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs.interval import ( /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/internals.py:14: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import internals as libinternals /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/sparse/array.py:33: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.sparse as splib /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/window.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.window as _window /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/groupby/groupby.py:68: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import (lib, reduction, /home/ubuntu/.local/lib/python2.7/site-packages/pandas/core/reshape/reshape.py:30: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos as _algos, reshape as _reshape /home/ubuntu/.local/lib/python2.7/site-packages/pandas/io/parsers.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 import pandas._libs.parsers as parsers /home/ubuntu/.local/lib/python2.7/site-packages/pandas/io/pytables.py:50: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from pandas._libs import algos, lib, writers as libwriters WARNING:werkzeug: * Debugger is active!alexiswl commentedon Aug 20, 2018
For now, rolling back to numpy 1.14.5 through conda, will resolve this
conda install numpy==1.14.5 --yesUpdate .travis.yml
Update .travis.yml
odb2 commentedon Apr 18, 2019
As of now, I tried rolling back numpy to 1.14.5 and all other versions but none worked but upgrading to 1.16.1 finally fixed it!
odb2 commentedon Apr 18, 2019
pip install numpy==1.16.1