python - Scipy error: numpy.dtype size changed, may indicate binary incompatibility (and associated strange behavior) -
i installing numpy/scipy/scikit-learn on os x 10.9.4, , getting errors "numpy.dtype size changed, may indicate binary incompatibility".
here's did construct repo:
mkvirtualenv thm workon thm pip install numpy scipy pandas ipython # , other stuff cd /path/to/our/repo # run tests here's traceback excerpt of relevant warning (turned error because use warnings.simplefilter('error') @ beginning of our tests):
====================================================================== error: failure: runtimewarning (numpy.dtype size changed, may indicate binary in compatibility) ---------------------------------------------------------------------- traceback (most recent call last): file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/nose/loader.py", line 414, in loadtestsfromname addr.filename, addr.module) file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/nose/importer.py ", line 47, in importfrompath return self.importfromdir(dir_path, fqname) file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/nose/importer.py ", line 94, in importfromdir mod = load_module(part_fqname, fh, filename, desc) file "/users/ben/code/thm/alpha/prosper/base/stats/test_auc.py", line 3, in <m odule> import sklearn.metrics file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/sklearn/metrics/ __init__.py", line 6, in <module> .metrics import (accuracy_score, file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/sklearn/metrics/metrics.py", line 27, in <module> scipy.spatial.distance import hamming sp_hamming file "/users/ben/.virtualenvs/thm/lib/python2.7/site-packages/scipy/spatial/__init__.py", line 90, in <module> .ckdtree import * file "__init__.pxd", line 155, in init scipy.spatial.ckdtree (scipy/spatial/ckdtree.c:20570) runtimewarning: numpy.dtype size changed, may indicate binary incompatibility i'm told warning caused scipy being compiled against different version of numpy 1 installed. however, installed them pip in thought pretty standard way, shouldn't problem, think.
weirdly, although running our entire test suite whole (via python -m unittest discover) gives these errors, running individual tests (via python -m unittest <module>) works fine.
according tests, here's relevant version info:
numpy version 1.9.0 (rev 07601a64cdfeb1c0247bde1294ad6380413cab66) scipy version 0.14.0 (built against numpy 1.9.0) sklearn version 0.15.2 pandas version 0.14.1 happy provide more info on request!
how did build sklearn 0.14.1? did build against same version of numpy did scipy?
recent versions of scikit-learn, scipy , numpy have prebuilt-packages. in particular scikit-learn 0.15.2 should binary compatible numpy 1.7+. think same true scipy 0.14.0 said built source, not pip should default (it should install prebuilt whl package).
edit: have tried do:
pip install -u scipy scikit-learn pandas to make sure using latest stable versions of whl packages?
edit: comment below has actual answer works , presumably why answer accepted. namely:
pip uninstall -y scipy scikit-learn pip install --no-binary scipy scikit-learn
Comments
Post a Comment