Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461\Chapter{Installation}23This package provides an interface between {\GAP} and PARI/GP.4PARI/GP itself is not part of this package. It has to be obtained and5installed independently of this package. {\Alnuth} works with PARI/GP6Version 2.5 or higher.78%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%9\Section{Installing Alnuth}1011The package {\Alnuth} is part of the standard distribution of {\GAP} so that12in most cases there is no need to install it separately. To use {\Alnuth}13you need to have PARI/GP installed. See the following section for14information on PARI/GP.1516In case you want to update {\Alnuth} independently of your main {\GAP}17installation or if you are interested in an old version of {\Alnuth}18interfacing to KANT/KASH you can find all released versions of {\Alnuth}19at the package's homepage20\URL{http://www.icm.tu-bs.de/ag_algebra/software/Alnuth/}2122in the form of gzipped tar-archives or as uncompressed tar-archives,23and starting with Version 3.0.0 also as zip archives for Windows. The24main page always contains the latest version of {\Alnuth}, while older25versions can be found under `Archives'.2627There are two ways of installing a {\GAP} package. If you have28permission to add files to the installation of {\GAP} on your system29you may install {\Alnuth} into the `pkg' subdirectory of the {\GAP}30installation tree. Otherwise you may install {\Alnuth} in a private31`pkg' directory (for details see Subsections "ref:Installing a GAP32Package" and "ref:GAP Root Directories" in the {\GAP} reference manual).3334To install the latest version of {\Alnuth} under Linux download one of35the archives `alnuth.tar' and `alnuth.tar.gz', move it to the36directory `pkg' in which you want to install, and unpack the37archive. If you are using the command line you can unpack the former38with the command `tar xf alnuth.tar', respectively `tar xzf39alnuth.tar.gz' for the gzipped tar-archive.4041For installation under Windows download the archive `alnuth-win.zip',42move it to the `pkg' directory in which you want to install, and43extract the archive (If you right click on the archive there should44appear a menu containing the entry `Extract here'.).4546%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%47\Section{Getting PARI/GP}4849Using {\Alnuth} requires an installation of PARI/GP in Version 2.5 or50higher. The software PARI/GP is freely available at51\URL{http://pari.math.u-bordeaux.fr/}5253Note that the place where PARI/GP is located in your system is54independent of the place where {\Alnuth} is installed.5556\beginlist57\item{\bf a.}58{\bf Installing under Linux}5960In many Linux distributions PARI/GP can be installed via the software61package manager, but this might sometimes be an older version which62cannot be used together with {\Alnuth}. (Starting GP from the command line63with the option `--version-short' will show you the version number.)6465If you install PARI/GP from source make sure you install with GMP66support for better performance and complete the installation with67`make install' so that you can start GP by just calling `gp' from the68command line.6970\item{\bf b.}71{\bf Installing under Windows}7273For Windows it is sufficient to get the basic GP binary which can be found at74\URL{http://pari.math.u-bordeaux.fr/download.html}75\endlist7677%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%78\Section{Adjust the path of the executable for GP}7980This package needs to know where the executable for GP is. In the81default setting {\Alnuth} looks for an executable program named `gp' in82the search paths of the system. More precisely, for a file `gp' inside83one of the directories in the list returned by84`DirectoriesSystemPrograms()' (called in a {\GAP} session).8586Under Linux the default setting should work with a standard87installation of PARI/GP.8889For the default setting to work under Windows the downloaded90executable file, for example `gp-2-5-0.exe' has to be renamed to91`gp.exe' and moved to one of the directories listed by92`DirectoriesSystemPrograms()' (Ignore the leading `cygdrive' in each93path name and note that the single letter specifies the drive, for94example `/cygdrive/c/Windows/' denotes the folder `Windows' on drive95`C:').9697To check whether an executable of GP in Version 2.5 or higher is98available with the default setting, you can use the function99\> PariVersion( )100101which prints the verion number, if the global variable `AL_EXECUTABLE'102is bound to the file name of a GP executable.103104If you cannot use the default setting for you purpose, you have105two options to specify a new place and name for the GP executable.106107If you are able to edit the file `defs.g' in the main directory of108{\Alnuth}, then you can change the line109\beginexample110BindGlobal("AL_EXECUTABLE", Filename(DirectoriesSystemPrograms(), "gp"));111\endexample112to something like113\beginexample114BindGlobal("AL_EXECUTABLE", "/home/my/pari-2.5.0/gp");115\endexample116under Linux or117\beginexample118BindGlobal("AL_EXECUTABLE", "/cygdrive/c/Users/my/Downloads/gp-2-5-0");119\endexample120under Windows, where the second argument gives the path to the GP121executable you want to use (Change the strings given above to reflect122the actual path on your system.). Please note that in case of a new123installation of {\Alnuth} you will have to change `defs.g' again.124125Alternatively you can also change your personal `gaprc' file (see126the Subsection "ref:The gaprc file" in the {\GAP} reference manual)127for setting the variable AL_EXECUTABLE to a proper value. To do this128add the appropriate line from above with the `BindGlobal' command to129`gaprc'.130131The third possibility is to change the path to the GP executable from132within {\GAP} using one of the following two functions. To do this you133first have to load the package (see Section "Loading and testing the134package").135\> SetAlnuthExternalExecutable( <path> )136137adjusts the global variable `AL_EXECUTABLE' for the current {\GAP}138session. Depending on your installation of PARI/GP and your operating139system the string <path> has to be either the command to start GP in a140terminal (for example `gp') or the complete path to the executable of GP141(for example `/cygwindrive/c/windows/gp'). The function returns `fail'142if <path> does not execute GP in Version 2.5.0 or higher.143144To make the change take effect for all of your {\GAP} sessions, you can145add `SetKantExecutable' with the path to the GP executable as argument146to your personal `gaprc' file (see the Subsection "ref:The gaprc file"147in the {\GAP} reference manual).148149If you want the change to affect all {\GAP} session of all users of the150{\GAP} installation you can use the following function:151\> SetAlnuthExternalExecutablePermanently( <path> )152153does the same as `SetAlnuthExternalExecutable' and in addition trys to154change the file `defs.g' accordingly in the currently loaded version155of {\Alnuth}. A warning is issued if there is no write access to `defs.g'156from the current {\GAP} session.157158\> RestoreAlnuthExternalExecutable( )159160trys to restore the original content of the file `defs.g' in the161directory corresponding to the loaded version of {\Alnuth}. The function162returns `fail' if there is no write access to `defs.g'163from the current {\GAP} session.164165%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%166\Section{Loading and testing the package}167168If {\Alnuth} is not loaded when GAP is started you have to request it169explicitly to use it. This is done by calling `LoadPackage("Alnuth");'170in a GAP session. If {\Alnuth} had not been loaded already a short171banner will be displayed.172173\beginexample174gap> LoadingPackage("alnuth");175Loading Alnuth 3.0.0 ...176true177gap>178\endexample179To load a certain version of Alnuth you can specify the version number as180second argument in the call to `LoadPackage'. (See `77.2 Loading a GAP181package' in the reference manual or type `?LoadPackage' within a GAP session).182183Once the package is loaded, it is possible to check the correct installation184running a short test by calling `ReadPackage("Alnuth",185"tst/testinstall.tst");'.186187\beginexample188gap> ReadPackage("Alnuth", "tst/testinstall.g");189Line 5 :190+ Test availability and version of PARI/GP191Line 5 :192+ GAP4stones: 25000193Line 85 :194+ Installation test of Alnuth package195Line 85 :196+ GAP4stones: 609197true198gap>199\endexample200201The number of GAP4stones will usually differ; other discrepancies in the202output indicate some problem.203204If the test suite runs into an error in the first part, which verifies the205availability of PARI/GP, check your installation of PARI/GP and consult the206last chapter of the documentation of Alnuth for more information.207208If you find any bugs or have any suggestions or comments, we would very much209appreciate it if you would let us know by writing to `a.distler(at)tu-bs.de'.210211212