Hello,

I am experiencing an issue using the Guava package in SageMath 10.3 with 
GAP 4.12.2 installed on my system. The strange part is that *Guava works 
when I use the GAP console inside Sage*, but it doesn't work when I try to 
load it through Sage directly.
The Issue: 
   
   - *SageMath Version*: 10.3 
   - *GAP Version*: 4.12.2 
   - *Problem*: I can successfully load Guava when I open GAP via Sage’s 
   gap.console(), but *when I try to load it directly from Sage*, I get an 
   error. I have set the path to the external GAP binary in Sage, but this 
   doesn’t seem to fix the issue. 

What I Tried: 
   
   1. 
   
   *Changing GAP Binaries*: I set the path to the external GAP binary 
   (installed on my system) by updating the SAGE_GAP_BINARY environment 
   variable and running source ~/.bashrc.
   - Command: export SAGE_GAP_BINARY="/usr/local/bin/gap" 
   2. 
   
   *Setting Sage to Use My GAP*:
   - I added the following to my Sage configuration to ensure Sage uses my 
      installed GAP version: 
   import sage.interfaces.gap sage.interfaces.gap.gap_cmd = 
   "/usr/local/bin/gap" 
   3. 
   
   *Trying to Load Guava*:
   - After setting the gap_cmd correctly, I attempted to load the Guava 
      package using the following command within Sage: 
   gap.eval('LoadPackage("Guava");') 
   
   *Error Output*:
   'fail' 
   4. 
   
   *Direct GAP Console Access*:
   - When I open GAP directly via the terminal (not through Sage), and run 
      LoadPackage("Guava");, it works fine, loading the package without any 
      issues. 
   5. 
   
   *Trying GAP Console from Inside Sage*:
   - When I use the following code to launch GAP inside Sage: 
   gap.console() 
   
   *Guava loads without any errors*.
   6. 
   
   *Attempting Additional GAP Functions*:
   - I attempted using 
      DirectoriesPackageLibrary("/home/seddas/gap-4.12.2/pkg/guava"), but it 
      returns an empty list ('[ ]'). 
      - I also tried using SetPackagePath("/home/seddas/gap-4.12.2/pkg") to 
      set the correct path, but the issue persists. 
   7. 
   
   *Reinstalling Guava*:
   - I double-checked the installation and directory structure, and Guava 
      seems to be installed correctly in /home/seddas/gap-4.12.2/pkg/guava. 
   
Errors Encountered: 
   
   1. 
   
   *Error when loading Guava in Sage*:
   'fail' 
   2. 
   
   *Error when trying to add the package directory in GAP*:
   Error, Variable: 'AddPackageDirectory' must have a value 
   3. 
   
   *Error when attempting to set the GAP package directory*:
   [ ] 

Summary: 
   
   - *Guava works when accessed through Sage’s GAP console using 
   gap.console().* 
   - *When I try to load Guava through Sage directly, it fails.* 

I would really appreciate your help, as I have been trying to resolve this 
issue for several hours without success. Thank you very much!


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/9a5a7519-e41b-4d7a-afce-0a15d6af4f68n%40googlegroups.com.

Reply via email to