Shap: is there whl file available for shap

Created on 19 Apr 2018  Â·  16Comments  Â·  Source: slundberg/shap

Hi
I tried to install shap using pip, it didnt work. I have microsoft visual C++ 14.0+ version installed, still my pip always throws error (not just for this). Didnt find time to solve it. Meanwhile if a package has .whl file it works. It was not available for shap in the unofficial site of wheel files.
Can you make a .whl file for 64 bit windows 10?
Thanks
Aparna

todo

Most helpful comment

@slundberg could you please add the linux version of the wheels?

All 16 comments

Building a whl for windows would be nice, but since I don't use windows I
need to figure out how to use Appveyor to do this...and I have not yet
gotten there. That being said the C++ code is only needed for scikit-learn
tree models, so I just pushed 0.14.1 to fail gracefully when the extension
does not compile.

Let me know if 0.14.1 works for you!

  • Scott

On Wed, Apr 18, 2018 at 11:07 PM Aparna C Shastry notifications@github.com
wrote:

Hi
I tried to install shap using pip, it didnt work. I have microsoft visual
C++ 14.0+ version installed, still my pip always throws error (not just for
this). Didnt find time to solve it. Meanwhile if a package has .whl file it
works. It was not available for shap in the unofficial site of wheel files.
Can you make a .whl file for 64 bit windows 10?
Thanks
Aparna

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/60, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADkTxU-pwKJY7MX3H-MO5RhNPo-dK874ks5tqCm6gaJpZM4TbMzR
.

@aparnack Try installing through conda via:

conda install -c anaconda py-xgboost

works for me on 64-bit Win 10.

Right, it should work on windows without the wheel now after 0.14.1.
TreeExplainer just won't support sklearn models if there is no compiler.

On Thu, May 3, 2018 at 5:25 AM drennings notifications@github.com wrote:

@aparnack https://github.com/aparnack Try installing through conda via:

conda install -c anaconda py-xgboost

works for me on 64-bit Win 10.

—
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/60#issuecomment-386278020, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADkTxeyIKXye3Fkxc5ZrdOYbSIUL3m8Kks5tuvdEgaJpZM4TbMzR
.

An easier way out is to remove (temporarily) the two C++ header files namely stdint.cpp and inttypes.cpp from the .\Anaconda3\include\ directory

Had just installed the same by doing so.. @aparnack

This were the error in my case ( a simple fix ) and my understanding is this

This is not a Python problem. For some reason you ended up with copies of Windows/Linux include files for integer definitions:

`.\include\stdint.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"

.\include\inttypes.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"
`

Can you add a wheel file to the pypi repository?
I have a very closed CentOS server were I can't easily installl a compiler

The tricky part is compiling a wheel on every system (like CentOS) for every release. If anyone wants to take a shot at it that's great (it's possible with Travis and Appveyor). As a workaround you could just build the package with python setup.py build on a CentOS machine with a compiler, then copy it to the final locked down machine where you can then install it.

I also have this issue on Windows machine. And the two files are not located in the directory AdityaSon mentions. I installed Microsoft Visual C++ Build Tools 14.0+ too, and added C:>Program Files (x86)>MSBuild/14.0/Bin to my System PATH, and still did not work.

I am also facing the same issue. Even though I have the visual C++ 14.1.1 version i still get the same error. Please let us know if you created a whl for windows os. Also I am fairly new to these tools. Is Shapely and Shap are similar packages?.

I'll see what I can about a wheel. @IamAVB The Shapely python package has nothing to do with Shapley values or SHAP, I think it is a plotting library.

As of v0.20.1 there are now x64 Window's wheels on PyPI for Python 3.6 and 3.7 :) Let me know if they don't work.

@slundberg could you please add the linux version of the wheels?

I’ll add them when I can. It would need to be part of the Travis build process so they get built for each release

Can you have some timeline on adding those linux wheels?

Hi everyone...in case you were having trouble on Windows installing SHAP because you don't have a C++ compiler, try typing this into your Python instance:

conda install libpython m2w64-toolchain -c msys2

This should install a compiler for you. Facebook's Prophet requires this for Window's machines to install because it also uses C++ compiler, so hopefully it applies here too.

Actually i try to vendor dependency on linux, so I can deploy it and install shap from directory and not to download any dependency from internet

@bukson I don't want to commit to a timeline since it depends on me finishing other higher priority (for me) things on my plate. I have been on travel for most of this past month, so a lot has piled up. If it's important for you now I would suggest either just building a wheel yourself on a machine you are free to install everything on (using python setup.py build). Or if you want it to be part of the ongoing release cycle then a PR would of course be welcome :)

Was this page helpful?
0 / 5 - 0 ratings