Ask Your Question
0

KeyError: SAGE_ROOT with 3-manifolds 10.8 binary [closed]

asked 2026-01-06 19:18:32 +0100

dyne2meter gravatar image

updated 2026-01-06 19:34:00 +0100

I'll preface this by admitting this would be a question if I hadn't already solved it by research. It is a known issue that, for example, typing help(some_command) in the 10.8 release of sagemath on some systems gets the KeyError: SAGE_ROOT message -- at the very least, the standard help system is broken. Since I have both 10.7 and 10.8 running on my Mac as I compare them for compatibility, I noted that this error is not present in 10.7. I looked at the startup scripts, and did some cursory comparisons, and saw that the way SAGE_ROOT is handled is more elaborate in 10.7 and that the environment variable is left blank in 10.8 if there are issues; that is what I was experiencing by, for example sage --root in the terminal in release 10.8. Doing the same in 10.7 led me to the solution I found.

The fix (at least in my case is to use the symlink in /var/tmp in the following way: Since I have both 10.7 and 10.8, the startup scripts in /usr/local/bin are called sage and sage10_7 (which was not overwritten when I installed the support package for the 10.8 release). I also have aliases in my own .login script, mainly for starting the jupyter notebook in a given directory. I edited those to do the following:

alias nbs7 "setenv SAGE_ROOT '/var/tmp/sage-10.7-current'; sage10_7 --notebook jupyter '/Eight/Fold/Path'"

and similarly for starting the notebook in release 10.8. I'm sure the developers had reasons for changing the startup scripts for the system, and I don't think what I've done is the worst kluge ever; for me it is sure easier than trying to figure out why my package could not find SAGE_ROOT by default. Other users report this issue (maybe with very different etiology from my particular issue). If I have a lingering question, it is asking whether there is a more 'standard' way of dealing with this issue. Obviously, if I were not concurrently running two versions, I could set-it-and-forget-it on the environment variable with one line in the .login. Thanks for reading, and for any suggestions you have.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by dyne2meter
close date 2026-01-11 08:03:20.267027

1 Answer

Sort by ยป oldest newest most voted
1

answered 2026-01-10 21:59:35 +0100

Marc Culler gravatar image

This issue, along with several others, has been fixed in the latest release (2.8.3) of the SageMath-10.8 app for macOS. Please download the latest release from https://github.com/3-manifolds/Sage_m... .

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2026-01-06 19:18:32 +0100

Seen: 35 times

Last updated: 19 hours ago