Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR IN INSTALLING FastTreeSHAP #25

Open
ya-stack opened this issue May 18, 2023 · 2 comments
Open

ERROR IN INSTALLING FastTreeSHAP #25

ya-stack opened this issue May 18, 2023 · 2 comments

Comments

@ya-stack
Copy link

Hi Team,

I am not able to install the FastTreeSHAP library in Kubeflow, facing below error -

 building 'fasttreeshap._cext' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/fasttreeshap
  creating build/temp.linux-x86_64-3.9/fasttreeshap/cext
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -I/usr/local/lib/python3.9/dist-packages/numpy/core/include -c fasttreeshap/cext/_cext.cc -o build/temp.linux-x86_64-3.9/fasttreeshap/cext/_cext.o -fopenmp
  fasttreeshap/cext/_cext.cc:3:10: fatal error: Python.h: No such file or directory
      3 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for fasttreeshap
Failed to build fasttreeshap
ERROR: Could not build wheels for fasttreeshap, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 22.0.4; however, version 23.1.2 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

@jlyang1990
Copy link
Collaborator

@ya-stack It seems that there is an issue with installing the header files and static libraries for python dev. Would you like to try the approaches mentioned in https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory or similar posts?

@arilwan
Copy link

arilwan commented Oct 27, 2023

Using Python3.8 and this what works for me:

sudo apt install libpython3.8-dev

Source: https://stackoverflow.com/a/57698471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants