NorskRegnesentral / shapr

Explaining the output of machine learning models with more accurately estimated Shapley values
https://norskregnesentral.github.io/shapr/
Other
147 stars 34 forks source link

Failed installation - Windows 10 #397

Closed wbound90 closed 5 months ago

wbound90 commented 5 months ago

Hi,

I am trying to install python wrapper for shapr. During installation step at remotes::install_github("NorskRegnesentral/shapr") I get the following error:

Downloading GitHub repo NorskRegnesentral/shapr@HEAD Installing 7 packages: parallelly, digest, Rcpp, future, RcppArmadillo, future.apply, data.table Warning: unable to access index for repository http://cloud.r-project.org/bin/windows/contrib/3.6: cannot open URL 'http://cloud.r-project.org/bin/windows/contrib/3.6/PACKAGES' Packages which are only available in source form, and may need compilation of C/C++/Fortran: 'parallelly' 'digest' 'Rcpp' 'RcppArmadillo' 'data.table' Do you want to attempt to install these from sources? (Yes/no/cancel) Yes installing the source packages 'parallelly', 'digest', 'Rcpp', 'future', 'RcppArmadillo', 'future.apply', 'data.table'

trying URL 'http://cloud.r-project.org/src/contrib/parallelly_1.37.1.tar.gz' Content type 'application/x-gzip' length 146066 bytes (142 KB) downloaded 142 KB

trying URL 'http://cloud.r-project.org/src/contrib/digest_0.6.35.tar.gz' Content type 'application/x-gzip' length 230386 bytes (224 KB) downloaded 224 KB

trying URL 'http://cloud.r-project.org/src/contrib/Rcpp_1.0.12.tar.gz' Content type 'application/x-gzip' length 3430494 bytes (3.3 MB) downloaded 3.3 MB

trying URL 'http://cloud.r-project.org/src/contrib/future_1.33.2.tar.gz' Content type 'application/x-gzip' length 355510 bytes (347 KB) downloaded 347 KB

trying URL 'http://cloud.r-project.org/src/contrib/RcppArmadillo_0.12.8.4.0.tar.gz' Content type 'application/x-gzip' length 1406640 bytes (1.3 MB) downloaded 1.3 MB

trying URL 'http://cloud.r-project.org/src/contrib/future.apply_1.11.2.tar.gz' Content type 'application/x-gzip' length 63881 bytes (62 KB) downloaded 62 KB

trying URL 'http://cloud.r-project.org/src/contrib/data.table_1.15.4.tar.gz' Content type 'application/x-gzip' length 5387593 bytes (5.1 MB) downloaded 5.1 MB

  • installing source package 'parallelly' ... package 'parallelly' successfully unpacked and MD5 sums checked using staged installation ** libs rm -f parallelly.dll 000.init.o test_tcp_port.o gcc -I"C:/Programs/ANACON~1/2023.07/lib/R/include" -DNDEBUG -I"C:/Programs/ANACON~1/2023.07/lib/R/../../Library/mingw-w64/include" -O2 -Wall -std=gnu99 -march=x86-64 -mtune=generic -c 000.init.c -o 000.init.o /usr/bin/sh: line 1: gcc: command not found make: *** [C:/Programs/ANACON~1/2023.07/lib/R/etc/x64/Makeconf:208: 000.init.o] Error 127 ERROR: compilation failed for package 'parallelly'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/parallelly'
  • installing source package 'digest' ... package 'digest' successfully unpacked and MD5 sums checked using staged installation ** libs g++ -std=gnu++11 -I"C:/Programs/ANACON~1/2023.07/lib/R/include" -DNDEBUG -I. -I"C:/Programs/ANACON~1/2023.07/lib/R/../../Library/mingw-w64/include" -O2 -Wall -march=x86-64 -mtune=generic -c SpookyV2.cpp -o SpookyV2.o /usr/bin/sh: line 1: g++: command not found make: *** [C:/Programs/ANACON~1/2023.07/lib/R/etc/x64/Makeconf:215: SpookyV2.o] Error 127 ERROR: compilation failed for package 'digest'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/digest'
  • installing source package 'Rcpp' ... package 'Rcpp' successfully unpacked and MD5 sums checked using staged installation ** libs g++ -std=gnu++11 -I"C:/Programs/ANACON~1/2023.07/lib/R/include" -DNDEBUG -I../inst/include/ -I"C:/Programs/ANACON~1/2023.07/lib/R/../../Library/mingw-w64/include" -O2 -Wall -march=x86-64 -mtune=generic -c api.cpp -o api.o /usr/bin/sh: line 1: g++: command not found make: *** [C:/Programs/ANACON~1/2023.07/lib/R/etc/x64/Makeconf:215: api.o] Error 127 ERROR: compilation failed for package 'Rcpp'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/Rcpp'
  • installing source package 'data.table' ... package 'data.table' successfully unpacked and MD5 sums checked using staged installation


    WARNING: this package has a configure script It probably needs manual configuration


** libs gcc -I"C:/Programs/ANACON~1/2023.07/lib/R/include" -DNDEBUG -I"C:/Programs/ANACON~1/2023.07/lib/R/../../Library/mingw-w64/include" -fopenmp -O2 -Wall -std=gnu99 -march=x86-64 -mtune=generic -c assign.c -o assign.o /usr/bin/sh: line 1: gcc: command not found make: *** [C:/Programs/ANACON~1/2023.07/lib/R/etc/x64/Makeconf:208: assign.o] Error 127 ERROR: compilation failed for package 'data.table'

  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/data.table' ERROR: dependencies 'digest', 'parallelly' are not available for package 'future'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/future' ERROR: dependency 'Rcpp' is not available for package 'RcppArmadillo'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/RcppArmadillo' ERROR: dependency 'future' is not available for package 'future.apply'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/future.apply'

The downloaded source packages are in 'C:\Users\prasannm\AppData\Local\Temp\RtmpaUlXQr\downloaded_packages' Running R CMD build...

  • checking for file 'C:\Users\prasannm\AppData\Local\Temp\RtmpaUlXQr\remotesf48194844ef\NorskRegnesentral-shapr-ddd32c7/DESCRIPTION' ... OK
  • preparing 'shapr':
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'shapr_0.2.3.9200.tar.gz' ERROR: dependencies 'data.table', 'Rcpp', 'future.apply', 'RcppArmadillo' are not available for package 'shapr'
  • removing 'C:/Programs/Anaconda3/2023.07/Lib/R/library/shapr' Warning messages: 1: In missing_devel_warning(pkgdir) : Package shapr has compiled code, but no suitable compiler(s) were found. Installation will likely fail. Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.2: In i.p(...) : installation of package 'parallelly' had non-zero exit status 3: In i.p(...) : installation of package 'digest' had non-zero exit status 4: In i.p(...) : installation of package 'Rcpp' had non-zero exit status 5: In i.p(...) : installation of package 'data.table' had non-zero exit status 6: In i.p(...) : installation of package 'future' had non-zero exit status 7: In i.p(...) : installation of package 'RcppArmadillo' had non-zero exit status 8: In i.p(...) : installation of package 'future.apply' had non-zero exit status 9: In i.p(...) : installation of package 'C:/Users/user/AppData/Local/Temp/RtmpaUlXQr/filef483d12fb4/shapr_0.2.3.9200.tar.gz' had non-zero exit status

I have R version 3.6.3 in coda env and the steps pip install rbase and conda install -c r r did not give any error. I also tried remotes::install_github("NorskRegnesentral/shapr", dependencies = TRUE) but it did not help either.

I appreciate any help to proceed further.

wbound90 commented 5 months ago

Not sure what made this issue but I removed R and Rtools and reinstalled them to make it work. Probably a duplicate of #210