Opened 3 months ago
Closed 3 months ago
#33787 closed enhancement (fixed)
Installation manual: Update section "systemwide install"
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.7 
Component:  documentation  Keywords:  
Cc:  dimpase, jhpalmieri, slelievre  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  John Palmieri 
Report Upstream:  N/A  Work issues:  
Branch:  7bc3394 (Commits, GitHub, GitLab)  Commit:  7bc33942f364445d82bab575065a1ff160cb7ed9 
Dependencies:  Stopgaps: 
Description (last modified by )
(split out from #30207)
https://doc.sagemath.org/html/en/installation/source.html#installationinamultiuserenvironment should be updated:
 Don't edit the script
 Just symlink to the
sage
script in venv
We also add a link from the README to an optional step described only in the installation manual.
Change History (21)
comment:1 Changed 3 months ago by
 Branch set to u/mkoeppe/installation_manual__update_section__system_wide_install_
comment:2 Changed 3 months ago by
 Commit set to 60bcbecc6ee4e3298c67b7fbd6de59174926d438
 Status changed from new to needs_review
comment:3 Changed 3 months ago by
 Commit changed from 60bcbecc6ee4e3298c67b7fbd6de59174926d438 to 2116f9fbadb3338038cc188dd3207d917e600172
Branch pushed to git repo; I updated commit sha1. New commits:
2116f9f  README.md: Update final step 'symlink sage', add jupyter kernel step

comment:4 Changed 3 months ago by
 Description modified (diff)
comment:5 Changed 3 months ago by
 Cc slelievre added
comment:6 followup: ↓ 13 Changed 3 months ago by
The suggestion to use
$ sudo ln s $(sage sh c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
is not consistent with the toplevel sage
script, which has
if [ x "$SAGE_ROOT/src/bin/sage" ]; then exec "$SAGE_ROOT/src/bin/sage" "$@" elif [ x "$SAGE_ROOT/local/bin/sage" ]; then # if in a stripped binary # Note in this case we assume that SAGE_LOCAL is the "local" subdirectory exec "$SAGE_ROOT/local/bin/sage" "$@" else echo >&2 "$0: no Sage installation found in \$SAGE_ROOT=$SAGE_ROOT" exit 1 fi
(a) Should the Sage script look in venv/bin
rather than local/bin
? (b) Should the suggestion be to make a symlink to SAGE_ROOT/src/bin/sage
?
comment:7 Changed 3 months ago by
The local/bin/sage
could be changed to venv/bin/sage
, yes. But this distinction only matters when configure prefix
is not in use because prefix
implies withoutsagevenv
. (In Volker's binary build, prefix
is used.)
The "elif" branch is only relevant in binary builds that don't ship src
. Do Volker's binary builds (which we no longer advertise) have src
?
comment:8 Changed 3 months ago by
Do Volker's binary builds (which we no longer advertise) have
src
?
Actually, this turns out to be irrelevant  it looks like Volker stopped making these binaries altogether, the last one is 9.4 http://files.sagemath.org/linux/64bit/index.html
comment:9 Changed 3 months ago by
But for the record, http://files.sagemath.org/linux/64bit/sage9.4Ubuntu_20.04x86_64.tar.bz2 does have src
, but it does not have the symbolic link venv
(that was introduced in 9.5)
comment:10 Changed 3 months ago by
"stripped binary" might refer to what make micro_release
creates. I have never used, but I think it is in use in the userfacing Docker containers somehow. It deletes a lot of stuff, but it does leave src/bin
around.
comment:11 Changed 3 months ago by
 Commit changed from 2116f9fbadb3338038cc188dd3207d917e600172 to e537bf3da74b6ccc657afcf1d48fd52addd67bf3
comment:12 Changed 3 months ago by
So here's a simplification.
comment:13 in reply to: ↑ 6 Changed 3 months ago by
Replying to jhpalmieri:
(b) Should the suggestion be to make a symlink to
SAGE_ROOT/src/bin/sage
?
No. SAGE_ROOT/sage
uses src/bin/sage
to allow for uses in unconfigured source trees.
After a build of Sage, using the installed version is more canonical.
comment:14 Changed 3 months ago by
Followup = #33841
comment:15 Changed 3 months ago by
How can you run
sudo ln s $(sage sh c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
is sage
isn't already in your path?
comment:16 Changed 3 months ago by
Thanks for catching this
comment:17 Changed 3 months ago by
 Commit changed from e537bf3da74b6ccc657afcf1d48fd52addd67bf3 to 7bc33942f364445d82bab575065a1ff160cb7ed9
Branch pushed to git repo; I updated commit sha1. New commits:
7bc3394  README.md: Use ./sage in command line

comment:18 Changed 3 months ago by
(I had copied this from similar invocations shown in src/doc/en/installation/launching.rst
, which however start with "Assuming that SageMath can be invoked by typing sage
"
comment:19 Changed 3 months ago by
 Reviewers set to John Palmieri
 Status changed from needs_review to positive_review
Looks good to me.
comment:20 Changed 3 months ago by
Thanks!
comment:21 Changed 3 months ago by
 Branch changed from u/mkoeppe/installation_manual__update_section__system_wide_install_ to 7bc33942f364445d82bab575065a1ff160cb7ed9
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
README.md, src/doc/en/installation/source.rst: Update multiuser install