I am trying to call GAP's SmallGroup program from within SAGE.
When I run gap_console(); from Sage I have the banner that indicates the SmallGroup library is present:
Components: small 2.1, small2 2.0, small3 2.0, small4 1.0, small5 1.0, small6 1.0, small7 1.0, small8 1.0, small9 1.0, small10 0.2, id2 3.0, id3 2.1, id4 1.0, id5 1.0, id6 1.0, id9 1.0, id10 0.1, prim 2.1 loaded. Packages: CTblLib 1.1.3 loaded.
Moreover, I can use SmallGroup from within this session of GAP run in SAGE.
The problem is that when I try to run SmallGroup from within SAGE (via gap.SmallGroup(12,3) for instance)
I get the error copied below, which suggests that SmallGroups is not installed in GAP (even though it is):
What can I do?
I loaded the version of GAP that I downloaded seperately instead of the one that came with SAGE via the commands:
import sage.interfaces.gap sage.interfaces.gap.gap_cmd = "/usr/bin/gap -r"
Thank you very much!
RuntimeError Traceback (most recent call last) in () ----> 1 gap.SmallGroup(Integer(12),Integer(3));
/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in call(self, args, *kwds) 561 562 def call(self, args, *kwds): --> 563 return self._parent.function_call(self._name, list(args), kwds) 564 565 def _sage_doc_(self):
/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds) 894 self.eval('SAGE_LAST := %s;;'%marker) 895 res = self.eval("%s(%s)"%(function, ",".join([s.name() for s in args]+ --> 896 ['%s=%s'%(key,value.name()) for key, value in kwds.items()]))) 897 if self.eval('last') != marker: 898 return self.new('last')
/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in eval(self, x, newlines, strip, split_lines, *kwds) 568 if not input_line.endswith(';'): 569 input_line += ';' --> 570 result = Expect.eval(self, input_line, *kwds) 571 if not newlines: 572 result = result.replace("\n","")
/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, *kwds) 1222 elif split_lines: 1223 return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, *kwds) -> 1224 for L in code.split('\n') if L != '']) 1225 else: 1226 return self._eval_line(code, allow_use_file=allow_use_file, **kwds)
/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed) 767 return '' 768 else: --> 769 raise RuntimeError(message) 770 771 except KeyboardInterrupt:
RuntimeError: Gap produced error output Error, the Small Groups library is required but not installed executing SmallGroup(sage1,sage2);