Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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 some has a workaround for this, please send it.

Unable to get Show() with GTK backend inside Sage

I am trying to do the following with GTK as the sage backend. backend.

import matplotlib.pyplot as plt

plt plt.plot([1,2,3]) plt.ylabel('Numbers') plt.show()

plt.show()

I am able to do this inside Python with the following: following:

import matplotlib
matplotlib.use('GTK')
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('Numbers')
plt.show()

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

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.

details. ERROR configuring pygtk for build!

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 some has a workaround for this, please send it.

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 some someone has a workaround for this, please send send/propose it.