linkedin / FastTreeSHAP

Fast SHAP value computation for interpreting tree-based models
BSD 2-Clause "Simplified" License
500 stars 30 forks source link

"error: could not find a version that satisfies the requirement setuptools (from versions: none)" #24

Open ddlinh opened 1 year ago

ddlinh commented 1 year ago

I cannot install the package fasttreeshap using pip in python 3.8 due to the error below. I'm using setuptools as version 51.0.0.

How can I solve this?

Many thanks, image

Mathanraj-Sharma commented 1 year ago

@ddlinh From the stack trace you shared I think you had a connection issue (pip is trying to establish a HTTPS connection to the internet and it is failing)

For me it worked like a charm

  ~/Downloads ❯ pip install fasttreeshap        fast-tree-shap at  13:52:46
Collecting fasttreeshap
  Downloading fasttreeshap-0.1.6.tar.gz (287 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 287.0/287.0 kB 552.6 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from fasttreeshap)
  Downloading numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 4.5 MB/s eta 0:00:00
Collecting scipy (from fasttreeshap)
  Using cached scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
Collecting scikit-learn (from fasttreeshap)
  Using cached scikit_learn-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.8 MB)
Collecting pandas (from fasttreeshap)
  Using cached pandas-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
Collecting tqdm>4.25.0 (from fasttreeshap)
  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting packaging>20.9 (from fasttreeshap)
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting slicer==0.0.7 (from fasttreeshap)
  Using cached slicer-0.0.7-py3-none-any.whl (14 kB)
Collecting numba (from fasttreeshap)
  Downloading numba-0.57.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 3.9 MB/s eta 0:00:00
Collecting cloudpickle (from fasttreeshap)
  Downloading cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting psutil (from fasttreeshap)
  Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Collecting shap (from fasttreeshap)
  Downloading shap-0.41.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (575 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 575.9/575.9 kB 4.3 MB/s eta 0:00:00
Collecting llvmlite<0.41,>=0.40.0dev0 (from numba->fasttreeshap)
  Downloading llvmlite-0.40.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 MB 3.0 MB/s eta 0:00:00
Collecting importlib-metadata (from numba->fasttreeshap)
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting python-dateutil>=2.8.2 (from pandas->fasttreeshap)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2020.1 (from pandas->fasttreeshap)
  Using cached pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting tzdata>=2022.1 (from pandas->fasttreeshap)
  Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)
Collecting joblib>=1.1.1 (from scikit-learn->fasttreeshap)
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting threadpoolctl>=2.0.0 (from scikit-learn->fasttreeshap)
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas->fasttreeshap)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting zipp>=0.5 (from importlib-metadata->numba->fasttreeshap)
  Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Building wheels for collected packages: fasttreeshap
  Building wheel for fasttreeshap (pyproject.toml) ... done
  Created wheel for fasttreeshap: filename=fasttreeshap-0.1.6-cp38-cp38-linux_x86_64.whl size=445532 sha256=9c3d5b33fea13a5ac9599fdfe75ed4ce7a6e6e81926198d7501f708f5e5f8e3c
  Stored in directory: /home/mathanraj-sharma/.cache/pip/wheels/38/d5/0e/220cd272e581c1004f9f34e4df273a44c94a6122100ecf034f
Successfully built fasttreeshap
Installing collected packages: pytz, zipp, tzdata, tqdm, threadpoolctl, slicer, six, psutil, packaging, numpy, llvmlite, joblib, cloudpickle, scipy, python-dateutil, importlib-metadata, scikit-learn, pandas, numba, shap, fasttreeshap
Successfully installed cloudpickle-2.2.1 fasttreeshap-0.1.6 importlib-metadata-6.7.0 joblib-1.2.0 llvmlite-0.40.1 numba-0.57.1 numpy-1.24.4 packaging-23.1 pandas-2.0.2 psutil-5.9.5 python-dateutil-2.8.2 pytz-2023.3 scikit-learn-1.2.2 scipy-1.10.1 shap-0.41.0 six-1.16.0 slicer-0.0.7 threadpoolctl-3.1.0 tqdm-4.65.0 tzdata-2023.3 zipp-3.15.0

Environment

# packages in environment at /home/mathanraj-sharma/miniconda3/envs/fast-tree-shap:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             5.1                       1_gnu    defaults
ca-certificates           2023.05.30           h06a4308_0    defaults
cloudpickle               2.2.1                    pypi_0    pypi
fasttreeshap              0.1.6                    pypi_0    pypi
importlib-metadata        6.7.0                    pypi_0    pypi
joblib                    1.2.0                    pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1    defaults
libffi                    3.4.4                h6a678d5_0    defaults
libgcc-ng                 11.2.0               h1234567_1    defaults
libgomp                   11.2.0               h1234567_1    defaults
libstdcxx-ng              11.2.0               h1234567_1    defaults
llvmlite                  0.40.1                   pypi_0    pypi
ncurses                   6.4                  h6a678d5_0    defaults
numba                     0.57.1                   pypi_0    pypi
numpy                     1.24.4                   pypi_0    pypi
openssl                   3.0.9                h7f8727e_0    defaults
packaging                 23.1                     pypi_0    pypi
pandas                    2.0.2                    pypi_0    pypi
pip                       23.1.2           py38h06a4308_0    defaults
psutil                    5.9.5                    pypi_0    pypi
python                    3.8.16               h955ad1f_4    defaults
python-dateutil           2.8.2                    pypi_0    pypi
pytz                      2023.3                   pypi_0    pypi
readline                  8.2                  h5eee18b_0    defaults
scikit-learn              1.2.2                    pypi_0    pypi
scipy                     1.10.1                   pypi_0    pypi
setuptools                67.8.0           py38h06a4308_0    defaults
shap                      0.41.0                   pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
slicer                    0.0.7                    pypi_0    pypi
sqlite                    3.41.2               h5eee18b_0    defaults
threadpoolctl             3.1.0                    pypi_0    pypi
tk                        8.6.12               h1ccaba5_0    defaults
tqdm                      4.65.0                   pypi_0    pypi
tzdata                    2023.3                   pypi_0    pypi
wheel                     0.38.4           py38h06a4308_0    defaults
xz                        5.4.2                h5eee18b_0    defaults
zipp                      3.15.0                   pypi_0    pypi
zlib                      1.2.13               h5eee18b_0    defaults