thomasp85 / lime

Local Interpretable Model-Agnostic Explanations (R port of original Python package)
https://lime.data-imaginist.com/
Other
486 stars 110 forks source link

Problem installing LIME from CRAN... #82

Closed sfd99 closed 6 years ago

sfd99 commented 6 years ago

Hi Thomas!

Latest R 3.4.3 & Rstudio 1.1.419 , Ubuntu Linux 14.04 LTS (32-bit)

Problem:
installing LIME from CRAN... (same problem with the dev version, too)"

install.packages('lime') Installing package into ‘/home/ray/R/i686-pc-linux-gnu-library/3.4’ (as ‘lib’ is unspecified) also installing the dependency ‘magick’

trying URL 'https://cran.rstudio.com/src/contrib/magick_1.7.tar.gz' Content type 'application/x-gzip' length 4880910 bytes (4.7 MB)

downloaded 4.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/lime_0.4.0.tar.gz' Content type 'application/x-gzip' length 1110049 bytes (1.1 MB)

downloaded 1.1 MB

The downloaded source packages are in ‘/tmp/RtmpiQFISL/downloaded_packages’

grayskripko commented 6 years ago

the same problem when devtools::install('my_package_with_github_lime_in_imports'):

...
* installing *source* package 'lime' ...
** libs
C:/RBUILD~1/3.4/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/R/MRO-R-~1.1/include" -DNDEBUG  -I"C:/Users/Gray/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/Gray/Documents/R/win-library/3.4/RcppEigen/include"   -I"C:/swarm/workspace/External-R-3.4.1/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
C:/RBUILD~1/3.4/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/R/MRO-R-~1.1/include" -DNDEBUG  -I"C:/Users/Gray/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/Gray/Documents/R/win-library/3.4/RcppEigen/include"   -I"C:/swarm/workspace/External-R-3.4.1/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c cosine_similarity.cpp -o cosine_similarity.o
C:/RBUILD~1/3.4/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/R/MRO-R-~1.1/include" -DNDEBUG  -I"C:/Users/Gray/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/Gray/Documents/R/win-library/3.4/RcppEigen/include"   -I"C:/swarm/workspace/External-R-3.4.1/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c permutations.cpp -o permutations.o
C:/RBUILD~1/3.4/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/R/MRO-R-~1.1/include" -DNDEBUG  -I"C:/Users/Gray/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/Gray/Documents/R/win-library/3.4/RcppEigen/include"   -I"C:/swarm/workspace/External-R-3.4.1/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c slic.cpp -o slic.o
slic.cpp: In function 'Rcpp::IntegerMatrix slic(Rcpp::RawMatrix, Rcpp::RawMatrix, Rcpp::RawMatrix, int, double, int)':
slic.cpp:152:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int j = 0; j < centers.size(); j++) {
                       ^
slic.cpp:183:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int j = 0; j < centers.size(); j++) {
                       ^
C:/RBUILD~1/3.4/mingw_64/bin/g++ -m64 -shared -s -static-libgcc -o lime.dll tmp.def RcppExports.o cosine_similarity.o permutations.o slic.o -LC:/swarm/workspace/External-R-3.4.1/vendor/extsoft/lib/x64 -LC:/swarm/workspace/External-R-3.4.1/vendor/extsoft/lib -LC:/PROGRA~1/R/MRO-R-~1.1/bin/x64 -lR
installing to C:/Users/Gray/Documents/R/win-library/3.4/lime/libs/x64
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** tests
** preparing package for lazy loading
Error : object 'image_blank' is not exported by 'namespace:magick'
thomasp85 commented 6 years ago

These are both problems related to the lime package. @grayskripko it looks like you just need to update magick. @sfd99 you seem to be missing the correct libraries to compile magick - try to find some instructions for installing magick on Linux machines

Bettina10 commented 6 years ago

Hi, @sfd99. I´m running RStudio Cloud Instance and have exactly the same problem like you. Have you got a solution for that? Thanks in advance!

grayskripko commented 6 years ago

magick upgrade did not help. @thomasp85 probably you should specify the working version of magick in DESCRIPTION

thomasp85 commented 6 years ago

@grayskripko can I get a session info as I'm unaware of the specific magick version dependency...

thomasp85 commented 6 years ago

@jeroen - do you know of any magick issues with RStudio Cloud?

jeroen commented 6 years ago

I don't really know what RStudio Cloud is but you should make sure libmagick++-dev is installed on the server. It should already be installed on shinyapps.io, but that is something different I guess?

jeroen commented 6 years ago

Just signed up for rstudio cloud and it all works out of the box:

screen shot 2018-03-26 at 11 50 06 pm
Bettina10 commented 6 years ago

grafik grafik

I think I need to install magick++ in Terminal using the command "sudo apt-get install libmagick++-dev". But I don´t have the authentication. I´ll try and update this tomorrow. Thank you all.

grayskripko commented 6 years ago

@thomasp85

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RevoUtilsMath_10.0.0

loaded via a namespace (and not attached):
[1] compiler_3.4.1   RevoUtils_10.0.5 tools_3.4.1      yaml_2.1.14  
jeroen commented 6 years ago

@thomasp85 the image_blank() function was introduced in magick 1.6

jeroen commented 6 years ago

@grayskripko you can solve this by upgrading your version of R or MRO. We are at R 3.4.4 now, or alternatively MRO 3.4.3. After upgrading R just run:

update.packages(ask = FALSE, checkBuilt = TRUE)
sfd99 commented 6 years ago

Thank you Bettina10!! As you suggested (your comment above), from Terminal: sudo apt-get install libmagick++-dev

I then installed LIME (from CRAN) with no problems. Yay! LIME finally installed OK :-)

And thank you Thomas for your great work on LIME.
Tusend Tak, min ven!!.

SFd99 San Francisco Latest version of Rstudio & R. Ubuntu Linux 14.04 LTS 32bits.

boyanangelov commented 6 years ago

This solution didn't work for me, but this one did (by using aptitude instead):

sudo aptitude install libmagick++-dev  
leowanderley81 commented 5 years ago

This solution didn't work for me, but this one did (by using aptitude instead):

sudo aptitude install libmagick++-dev  

I'm having the same problem trying to install magick, only on my VM. Locally it installs just fine. Guess I might be inputting the command wrongly at the Terminal. I have tried so far: sudo apt-get install libmagick++-dev
sudo aptitude install libmagick++-dev
and other possible/imaginables combinations ans terminal replies me with:

"install: missing destination file operand after ‘ImageMagick-c++-dev’ Try 'install --help' for more information."

Is it necessary to specify something after the command at the terminal??

leowanderley81 commented 5 years ago

This solution didn't work for me, but this one did (by using aptitude instead):

sudo aptitude install libmagick++-dev  

I'm having the same problem trying to install magick, only on my VM. Locally it installs just fine. Guess I might be inputting the command wrongly at the Terminal. I have tried so far: sudo apt-get install libmagick++-dev sudo aptitude install libmagick++-dev and other possible/imaginables combinations ans terminal replies me with:

"install: missing destination file operand after ‘ImageMagick-c++-dev’ Try 'install --help' for more information."

Is it necessary to specify something after the command at the terminal??

It has just worked out using sudo yum install ImageMagick-c++-devel