1

I am trying to use the gap package SimpComp on CoCalc in Sage. However, the way in which packages are supposed to be installed and imported is completely unclear to me. There are multiple locations in the directories that have to do with gap, I have no idea where to look. I have a free subscription to CoCalc.

I have tried several things. The package directory '/ext/sage/sage-8.8_1804/local/gap/latest/pkg/' is supposed to be the place where I need to install the package, but this is read only. The only other sensible suggestion I found was to make use of the user root for gap, and set some preference in the gap.ini file, but I have no idea how this should work.

If anyone has any suggestions, please let me know. The system is crazy convoluted.

1 Answers1

1

[Edited]

On CoCalc at https://cocalc.com you do not have admin rights, so you should install the SimpComp package as a user, that is, in ~/.gap/pkg (create this directory if it does not already exist).

Note that the PackageManager GAP package by Michael Torpey can make your life easier.

As revealed in the 2019-08-25 CoCalc software update news also posted on the cocalc mailing list and in a CoCalc tweet, GAP 4.10.2 is now available system-wide on CoCalc at cocalc.com.

This makes it easy to install any package, including SimpComp.

First load the PackageManager package:

gap> LoadPackage("PackageManager");
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  curlInterface 2.1.1 (Simple Web Access)
by Christopher Jefferson (http://caj.host.cs.st-andrews.ac.uk/) and
   Michael Torpey (http://www-groups.mcs.st-andrews.ac.uk/~mct25/).
Homepage: https://gap-packages.github.io/curlInterface/
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  PackageManager 0.4 (Easily download and install GAP packages)
by Michael Torpey (http://www-groups.mcs.st-andrews.ac.uk/~mct25/).
Homepage: https://gap-packages.github.io/PackageManager/
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
true

This makes the InstallPackage command available. Use it to install SimpComp:

gap> InstallPackage("SimpComp");
#I  Getting PackageInfo URLs...
#I  Retrieving PackageInfo.g from https://simpcomp-team.github.io/simpcomp/PackageInfo.g ...
#I  PackageInfo.g validated successfully
#I  Downloading archive from URL http://github.com/simpcomp-team/simpcomp/releases/download/v2.1.10/simpcomp-2.1.10.tar.gz ...
#I  Saved archive to /tmp/tmRcoUmG/simpcomp-2.1.10.tar.gz
#I  Extracting to /home/user/.gap/pkg/simpcomp ...
#I  Extracted successfully
#I  Checking dependencies for simpcomp...
#I    GAPDoc >=0.9999: true
#I    io >=3.0: true
#I  Running compilation script on /home/user/.gap/pkg/simpcomp ...
#I  Compilation was successful
true

The package will be installed in ~/.gap/pkg, and no need to worry about creating this directory, PackageManager will take care of creating it if needed.

Samuel Lelièvre
  • 3,212
  • 1
  • 14
  • 27
  • Thank you for the helpful answer. If I now however type in a sage worksheet: `%gap SCLoadPackage("simpcomp");` I get the error message: `RuntimeError: Gap produced error output Error, Variable: 'SCLoadPackage' must have a value executing SCLoadPackage(simpcomp); ;` – BetaBetaAlpha Jul 31 '19 at 11:53
  • I only know `LoadPackage`; what is `SCLoadPackage`? – Samuel Lelièvre Sep 01 '19 at 22:03
  • It's the command I have to use to load the package according to the installation guide. `LoadPackage` does not work either by the way – BetaBetaAlpha Sep 02 '19 at 23:38
  • 1
    It should be `LoadPackage` - I've reported this to package authors [here](https://github.com/simpcomp-team/simpcomp/issues/24). Have you managed to get `LoadPackage` to work since asking this? – Olexandr Konovalov Jul 14 '20 at 23:05