ModelOriented / shapper

An R wrapper of SHAP python library
https://modeloriented.github.io/shapper/
58 stars 16 forks source link

Cannot Library shapper package after installed it. #29

Closed ChenTaHung closed 3 years ago

ChenTaHung commented 4 years ago

The message in the console showed like this. I have tried installing from CRAN or from Github and both way installed successfully. I also installed numpy and pandas with reticulate::py_install function. Everything seems all right, but got an error while requiring it. Below is the error message

library(shapper) 錯誤: package or namespace load failed for ‘shapper’ in get(Info[i, 1], envir = env): lazy-load database '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/shapper/R/shapper.rdb' is corrupt 此外: Warning message: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

thank you for your reply.

maksymiuks commented 3 years ago

Have You tried reinstalling shapper from CRAN and restarting RStudio before loading shapper in? If so, before attaching shapper make sure reticulate uses python virtual env that has shap library installed. reticualate::use_condae("env_name", required = TRUE may be helpful.

ChenTaHung commented 3 years ago

Just solved it after restart RStudio. Thanks!