1

I'm trying to install Rattle and have been running into some issues. Below is the initial code and results.

install.packages('rattle', repo='https://cran.cnr.Berkeley.edu/')

also installing the dependency ‘RGtk2’

Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘RGtk2’
Do you want to attempt to install these from sources?

I tried yes and the error it gave me is this

configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RGtk2’
Warning in install.packages :
  installation of package ‘RGtk2’ had non-zero exit status
ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
  installation of package ‘rattle’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’

I also tried no and the error it gave me was this

ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
  installation of package ‘rattle’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’

Would anybody happen to know where I'm going wrong? Thank you in advance for any input.

MrFlick
  • 195,160
  • 17
  • 277
  • 295
Tomas
  • 115
  • 1
  • 2
  • 12
  • I have written a brief note on this. Hope it can help you: https://gist.github.com/zhiyzuo/a489ffdcc5da87f28f8589a55aa206dd – Zhiya Sep 03 '17 at 20:31
  • @Zhiya, should i be able to access rattle in RStudio accordingliy after the installs in the document – E B Sep 09 '17 at 18:19
  • @EB I've helped some people done this and some of them could not access rattle in RStudio saying that GTK+ is not initialized but the others can so I am not sure. You can try open XQuartz then open RStudio and run rattle. – Zhiya Sep 09 '17 at 22:27
  • @Zhiya, i am able to access it and it is working.. but it is just sometimes slower than expected – E B Sep 10 '17 at 07:52

1 Answers1

1

My reputation is too low to comment, so I must post an answer. Zhiya's method worked for some of my students. It was not working for everyone, so we worked out a second method (thanks, Tugay!!)

The wrapper method of GW also was not working, perhaps because since it was compiled some of the versions have changed. (My theory is that all of the following must have versions that can interoperate: R, RGtk+, GTK, MacOS, Rattle. When any of them is updated on my system, Rattle may stop working. That's why you got this message

configure: error: GTK version 2.8.0 required

My blog post documenting what worked for me is here. It works with: MacOS 10.13.4,R 3.4.4, Rattle 5.1.3, RGtk2 2.24.32. YMMV.

I am sure that if I knew some UNIX, I could have gotten other methods to work as well. Again, the apparent problem is that as of today there are not up-to-date versions of RGtk2 and GTK that are compiled for the latest MacOS. A suitable compiled version does exist for Windows and is in the CRAN repository. Solving the error messages requires compiling the missing programs from their source code versions on CRAN.

Roger Bohn
  • 111
  • 2