ECMWFCode4Earth / ml_drought

Machine learning to better predict and understand drought. Moving github.com/ml-clim
https://ml-clim.github.io/drought-prediction/
92 stars 18 forks source link

ImportError from shap library #56

Closed tommylees112 closed 5 years ago

tommylees112 commented 5 years ago
ImportError while importing test module '/soge-home/projects/crop_yield/ml_drought/tests/models/test_base.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/models/test_base.py:3: in <module>
    from src.models.base import ModelBase
src/models/__init__.py:2: in <module>
    from .regression import LinearRegression
src/models/regression.py:6: in <module>
    import shap
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/shap/__init__.py:11: in <module>
    from .plots.summary import summary_plot
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/shap/plots/summary.py:15: in <module>
    from . import colors
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/shap/plots/colors.py:7: in <module>
    import skimage.color
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/skimage/__init__.py:167: in <module>
    from .util.dtype import (img_as_float32,
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/skimage/util/__init__.py:8: in <module>
    from .arraycrop import crop
../../../users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/skimage/util/arraycrop.py:8: in <module>
    from numpy.lib.arraypad import _validate_lengths
E   ImportError: cannot import name '_validate_lengths' from 'numpy.lib.arraypad' (/soge-home/users/chri4118/.conda/envs/crp/lib/python3.7/site-packages/numpy/lib/arraypad.py)
tommylees112 commented 5 years ago

pip install -U scikit-image works