Shap: correct shap version for python 2.7

Created on 15 Jul 2019  路  3Comments  路  Source: slundberg/shap

Hi, I install the shap from pip:
pip install shap
I installed shap version : shap==0.29.3.
However, this version is not compatible with python 2.7, I get this error when import shap:
/home/jiamei.liu/.cache/bazel/_bazel_jiamei.liu/8171f41309b920455b8488d78c710b2b/execroot/__main__/bazel-out/release_links/lib/python_env/shap/common.py:10: UserWarning: As of version 0.29.0 shap only supports Python 3 (not 2)! warnings.warn("As of version 0.29.0 shap only supports Python 3 (not 2)!") File "/home/jiamei.liu/.cache/bazel/_bazel_jiamei.liu/8171f41309b920455b8488d78c710b2b/execroot/__main__/bazel-out/release_links/lib/python_env/shap/benchmark/measures.py", line 123 impute = mean_vals[impute_inds] + Cio @ Coo_inv @ (X_test[i, observe_inds] - mean_vals[observe_inds])
What is the correct version of shap for python 2.7?

Most helpful comment

Yep anything 0.28.x is good...0.28.5 being the last of those.

All 3 comments

I assume that 0.28.x will work. It looks like only some functions don't support Python 2.7.

Yep anything 0.28.x is good...0.28.5 being the last of those.

@slundberg
Hi, what about python3? It seems that shap does not work with python 3.4, does it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grofte picture grofte  路  4Comments

nickkimer picture nickkimer  路  4Comments

samupino picture samupino  路  3Comments

cbeauhilton picture cbeauhilton  路  3Comments

artemmavrin picture artemmavrin  路  4Comments