ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 12 Jan 2014 19:54:00 +0100Unable to get Show() with GTK backend inside Sagehttps://ask.sagemath.org/question/10909/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.
Sun, 12 Jan 2014 19:54:00 +0100https://ask.sagemath.org/question/10909/unable-to-get-show-with-gtk-backend-inside-sage/