Unable to get Show() with GTK backend inside Sage
I am trying to do the following with GTK as the sage backend.
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('Numbers')
plt.show()
I am able to do this inside Python with the following:
import matplotlib
matplotlib.use('GTK')
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('Numbers')
plt.show()
This fails in sage which asked me to install pygtk. When I did
sage: install_package('pygtk'),
it pulled an experimental pygtk-2.8.4 which failed with the following error
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR configuring pygtk for build!
I do have gcc/g++ installed in /usr/bin and in /usr/local/bin/sage/local/bin
All other backends like WX or PyQt4 run into other issues. I suspect this is a problem with the pygtk spkg. If someone has a workaround for this, please send/propose it.