Installing Rattle on MacOS 10.11 (or above)

This comment has been minimized.

edited

I have OS 10.11.4 running on a 2014 iMac, and R 3.4.1. This process breaks for me at step 9 with "Error: gtk+ 2.24.31 did not build"
Has something changed in the past few weeks, or am I doing something wrong?
UPDATE: It looks like I needed to reinstall Xquartz. I did that, the installation went fine (and took a lot longer), and everything seems to work now. Thanks for posting these instructions!

This comment has been minimized.

This comment has been minimized.

edited

Hello, great tutorial, thanks for sharing. I am having an issue at step 7 and I am unable to install cairo. The output of brew install --with-x11 cairo is below. I am running MacOs High Sierra 10.13.1 and gcc 7.2. What could be the error?

This comment has been minimized.

This comment has been minimized.

edited

Thank you so, so much for this tutorial. It made all the difference in being able to move forward on this issue. I am almost there. I was able to get all the way through the end and Rattle did open from XQuartz.

However, I tried to then open Rattle from R Studio and I'm getting stuck on a similar error as @uiang. I am wondering if anyone figured out how to get around it. I am running the following:

Mac OS 10.13.2 (High Sierra)

R 3.4.3 GUI 1.70 El Capitan build (7463)

XQuartz 2.7.11 (xorg-server 1.18.4)

RStudio Version 1.1.414

So when I use the XQuartz Terminal, I type library(rattle) and then rattle(), and Rattle opens.

This comment has been minimized.

I met a problem similar to mindexplore. In the step 15, when I type "library (cattle)" It showed
" R session is headless; GTK+ not initialized.
Rattle: A free graphical interface for data mining with R.
Version 5.0.14 Copyright (c) 2006-2017 Togaware Pty Ltd.
Type 'rattle()' to shake, rattle, and roll your data."
then, I type "rattle()", it showed
"Error in rattle() : Can't load RGtk2.
A windowing system can't be accessed?
Maybe you are using a remote terminal (ssh) or RStudio browser connection.
Consider using remote desktop, ssh -X, or X2Go depending on your platform.
Running rattle() locally on a desktop is the default.

(R:88432): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()"

This comment has been minimized.

Thanks for your tutorial. I really appreciate it. I am having the same problem when I try to load RGtk2 from the ~/Downloads folder. Some things I have tried:I checked and I do have gtk+ in my local/cellar folder. I also checked my .bash_profile and it looks like the path is in there. I also tried to load the source file from Xquartz with no luck. I'm not really sure what to do. Here's my error just in case:

(R:88491): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
Error in rattle() : Can't load RGtk2.
A windowing system can't be accessed?
Maybe you are using a remote terminal (ssh) or RStudio browser connection.
Consider using remote desktop, ssh -X, or X2Go depending on your platform.
Running rattle() locally on a desktop is the default.

Like you told another user here I tried to first load RGtk2 in the xquartz terminal but it does't seem to work. Do you have any idea on this ?

This comment has been minimized.

edited

@zhiyzuo, thanks for you efforts in presenting this tutorial. At Step 7, when applying brew install --with-x11 cairo, brew gave "Warning: cairo: this formula has no --with-x11 option so it will be ignored!", how do you enable the --with-x11 option at this step? Thanks!

This comment has been minimized.

@jamesmnw for(i in 1:1000000){print("THANKS")} That hidden error in the cairo build of ignoring the -x11 flag caused me days of grief. Thanks for pointing that out. Your edit worked perfectly, allowing the rest of the instructions to work. I can now Rattle and RQDA and the world is a better place. :-)

This comment has been minimized.

edited

Thanks for your detailed advice. But it is still frustrating for me.
After typing "brew install --build-from-source --verbose gtk+" , I received "Error: gtk+ 2.24.32 did not build"
Please help me out. It's too hard for me.

This comment has been minimized.

The key to success for me was to use @jamesmnw advice and edit the configuration file for cairo using the formula supplied in his post and build. After that gtk+ build without errors. I could then just follow the instructions to install RGtk2 and cairodevice + rattle. To bad they messed up Homebrews version of cairo and caused all these problems

This comment has been minimized.

Hello,
I need help. I am at step 8 with "brew edit gtk+"
When I am done editing the last two lines in df install, I do not know how to save or quit in the terminal.
I did run export EDITOR = vim.
I hope I provided info for troubleshooting.
Thanks a lot.