Ask Your Question

How to call GAPs SmallGroup from sage? (I am getting an error, though the correct library is installed.)

asked 2015-07-18 20:47:06 -0500

AreaMan gravatar image

updated 2015-07-19 12:11:29 -0500

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 = "/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([ for s in args]+ --> 896 ['%s=%s'%(key, for key, value in kwds.items()]))) 897 if self.eval('last') != marker: 898 return'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);



Running ./sage -i database_gap gives this error:

Found local metadata for database_gap-4.7.5 Attempting to download package database_gap-4.7.5

Trying to download [Traceback (most recent call last): File "", line 35, in File "/Applications/Sage-6.5 ...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-07-19 00:39:56 -0500

Nathann gravatar image

Run 'sage -i database_gap`, that solved it for me. I am going to check why the wrong message is apparently returned.


edit flag offensive delete link more


Hi Nathann,

When I run 'sage -i database_gap' I get an error which I will add to my original question because it is too long to post here.

AreaMan gravatar imageAreaMan ( 2015-07-19 12:10:44 -0500 )edit

This is due to a recent change in our hosting. Not your fault, but the only thing you can do is download a more recent version of Sage. If you have further questions and need to post long logs, please write to sage-support instead: this forum is " okayish" for simple questions, but it's hard to read long logs and you have no way to insert them in your 'comments'.

Nathann gravatar imageNathann ( 2015-07-19 12:34:15 -0500 )edit

Err sorry, there is something that you can do (though you really should use the latest version of Sage): download this file into /Applications/ You can then run 'sage -i database_gap' again.

Nathann gravatar imageNathann ( 2015-07-19 12:36:37 -0500 )edit

Thanks - that worked perfectly.

AreaMan gravatar imageAreaMan ( 2015-07-19 13:48:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-07-18 20:47:06 -0500

Seen: 427 times

Last updated: Jul 19 '15