Current advice for generic SageMath install advice

113 views
Skip to first unread message

Nils Bruin

unread,
Mar 27, 2023, 8:34:29 PM3/27/23
to sage-support
What would the current (Spring 2023) easiest instructions be for people to install sage? I'm asking in support of an install-fest for students, so the objective is to have easy solutions for giving students access on whatever platform they have available.
I know about cloud-based solutions, so I'll definitely point them to those. I'm asking for "the next step up".

In the install advice I see:
for OSX:
 - binary build of SageMath (looks like an excellent solution)
- https://anaconda.org/conda-forge/sage (would be a great place to point students to, because it's a rich environment for computational software). However: https://anaconda.org/conda-forge/sage seems to indicate that various architecture-specific builds are woefully outdated: "noarch" seems to be on point, but the architecture-specific ones seem stuck on 9.2. Am I reading the info wrong? Obviously I don't want to point people to 9.2 installs.

for windows:
 - OK WSL; that's great. However, it looks like Ubuntu would be the easiest linux distribution to get and as far as I can see, Ubuntu has 9.5 packaged at most? That's not great either.
 - conda: see above

for linux:
 - same thing.
 - conda: see above.

So is building from source the only way nowadays? That's sad. I'm fine doing that for myself, but for an installfest, that's really not feasible. Probably some machines will go in thermal meltdown as a result! Or should I just send them to 9.2 and 9.5 etc.

Also: if students want to use packages like normaliz, can they install those on binary installs? When I do it on source-built versions, it triggers extensive recompilation.

William Stein

unread,
Mar 27, 2023, 8:36:46 PM3/27/23
to sage-s...@googlegroups.com
On Mon, Mar 27, 2023 at 5:34 PM Nils Bruin <nbr...@sfu.ca> wrote:
What would the current (Spring 2023) easiest instructions be for people to install sage? I'm asking in support of an install-fest for students, so the objective is to have easy solutions for giving students access on whatever platform they have available.
I know about cloud-based solutions, so I'll definitely point them to those. I'm asking for "the next step up".


I can send you a bunch of vouchers for free cocalc licenses if you want to also give those out…


In the install advice I see:
for OSX:
 - binary build of SageMath (looks like an excellent solution)
- https://anaconda.org/conda-forge/sage (would be a great place to point students to, because it's a rich environment for computational software). However: https://anaconda.org/conda-forge/sage seems to indicate that various architecture-specific builds are woefully outdated: "noarch" seems to be on point, but the architecture-specific ones seem stuck on 9.2. Am I reading the info wrong? Obviously I don't want to point people to 9.2 installs.

for windows:
 - OK WSL; that's great. However, it looks like Ubuntu would be the easiest linux distribution to get and as far as I can see, Ubuntu has 9.5 packaged at most? That's not great either.
 - conda: see above

for linux:
 - same thing.
 - conda: see above.

So is building from source the only way nowadays? That's sad. I'm fine doing that for myself, but for an installfest, that's really not feasible. Probably some machines will go in thermal meltdown as a result! Or should I just send them to 9.2 and 9.5 etc.

Also: if students want to use packages like normaliz, can they install those on binary installs? When I do it on source-built versions, it triggers extensive recompilation.

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/d1717bce-b359-4f83-902d-68edc2399d2dn%40googlegroups.com.
--
-- William Stein

Isuru Fernando

unread,
Mar 27, 2023, 8:47:54 PM3/27/23
to sage-s...@googlegroups.com
Hi,

> However: https://anaconda.org/conda-forge/sage seems to indicate that various architecture-specific builds are woefully outdated: "noarch" seems to be on point, but the architecture-specific ones seem stuck on 9.2. Am I reading the info wrong? Obviously I don't want to point people to 9.2 installs.

We used to have separate architecture specific builds, but `sage` is now a meta-package that is architecture neutral (i.e. noarch).
So, you get sage-9.8 for all architectures. We support sage-9.8 for the following OS and architecture combinations
- linux-x86_64  (glibc>=2.12, most distros after 2010)
- linux-aarch64  (glibc>=2.17, most distros after 2014)
- macos-x86_64  (macos>=10.9)
- macos-arm64  (macos>=11.0)
You can have a look at https://anaconda.org/conda-forge/sagelib to see the architecture-specific builds.

> Also: if students want to use packages like normaliz, can they install those on binary installs? When I do it on source-built versions, it triggers extensive recompilation.

With conda, you can install binary packages for normaliz and thousands of other packages into the same environment as sage.

Isuru

--

Nils Bruin

unread,
Mar 27, 2023, 9:34:50 PM3/27/23
to sage-support
On Monday, 27 March 2023 at 17:47:54 UTC-7 Isuru Fernando wrote:

We used to have separate architecture specific builds, but `sage` is now a meta-package that is architecture neutral (i.e. noarch).
So, you get sage-9.8 for all architectures. We support sage-9.8 for the following OS and architecture combinations
- linux-x86_64  (glibc>=2.12, most distros after 2010)
- linux-aarch64  (glibc>=2.17, most distros after 2014)
- macos-x86_64  (macos>=10.9)
- macos-arm64  (macos>=11.0)
You can have a look at https://anaconda.org/conda-forge/sagelib to see the architecture-specific builds.

Thanks! I was hoping for an answer like that.Then it sounds like conda is presently the best option to get up to date binary sage.
 
> Also: if students want to use packages like normaliz, can they install those on binary installs? When I do it on source-built versions, it triggers extensive recompilation.

With conda, you can install binary packages for normaliz and thousands of other packages into the same environment as sage.

I'm not sure that's quite enough. In my experience, sagelib needs rebuilding to interface with normaliz (I think it's "make normaliz pynormaliz" nowadays, or perhaps one needs a pip install). I would expect that the binary distribution of sage for conda is built without normaliz/pynormaliz support, because those are optional packages. Installing these as prerequisites in conda wouldn't automatically activate the interfaces in sagemath. Does conda do something to get that to work? Has sagemath grown better at dynamically detecting libraries to interface with?

Isuru Fernando

unread,
Mar 27, 2023, 9:57:48 PM3/27/23
to sage-s...@googlegroups.com
> I'm not sure that's quite enough. In my experience, sagelib needs rebuilding to interface with normaliz (I think it's "make normaliz pynormaliz" nowadays, or perhaps one needs a pip install). I would expect that the binary distribution of sage for conda is built without normaliz/pynormaliz support, because those are optional packages. Installing these as prerequisites in conda wouldn't automatically activate the interfaces in sagemath. Does conda do something to get that to work? Has sagemath grown better at dynamically detecting libraries to interface with?

pynormaliz interface is indeed dynamically detected by sage. You just have to install pynormaliz.

There are a few optional libraries that are not dynamically detected and need to be present at build time.
See https://github.com/sagemath/sage/blob/master/src/setup.py#L82-L83
Out of those, conda builds sage with bliss and sirocco, but they are not installed by default when you
install sage. You need to install bliss and sirocco to get that functionality.

Isuru

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Dima Pasechnik

unread,
Mar 28, 2023, 5:24:38 AM3/28/23
to sage-s...@googlegroups.com
On Tue, Mar 28, 2023 at 1:34 AM Nils Bruin <nbr...@sfu.ca> wrote:
>
> What would the current (Spring 2023) easiest instructions be for people to install sage? I'm asking in support of an install-fest for students, so the objective is to have easy solutions for giving students access on whatever platform they have available.
> I know about cloud-based solutions, so I'll definitely point them to those. I'm asking for "the next step up".
>
> In the install advice I see:
> for OSX:
> - binary build of SageMath (looks like an excellent solution)
> - https://anaconda.org/conda-forge/sage (would be a great place to point students to, because it's a rich environment for computational software). However: https://anaconda.org/conda-forge/sage seems to indicate that various architecture-specific builds are woefully outdated: "noarch" seems to be on point, but the architecture-specific ones seem stuck on 9.2. Am I reading the info wrong? Obviously I don't want to point people to 9.2 installs.
>
> for windows:
> - OK WSL; that's great. However, it looks like Ubuntu would be the easiest linux distribution to get and as far as I can see, Ubuntu has 9.5 packaged at most? That's not great either.
> - conda: see above
>
> for linux:
> - same thing.
> - conda: see above.

there are linux distributions with up to date Sage:
see https://repology.org/project/sagemath/versions

ArchLinux
https://archlinux.org/packages/community/x86_64/sagemath/

Void:
https://voidlinux.org/packages/?arch=x86_64&q=sagemath

Manjaro;
Fedora Rawhide

And Gentoo and Nix - although it's trickier.

Archlinux may be run in WSL: https://github.com/yuk7/ArchWSL
Fedora as well:
https://www.linuxfordevices.com/tutorials/linux/install-fedora-on-windows
In fact, Microsoft says anything Linux in a Docker can be used on WSL:
https://learn.microsoft.com/en-us/windows/wsl/use-custom-distro

Also, there is Docker, which can run CoCalc:
https://hub.docker.com/r/sagemathinc/cocalc
as well as stock SageMath https://hub.docker.com/u/sagemath



>
> So is building from source the only way nowadays? That's sad. I'm fine doing that for myself, but for an installfest, that's really not feasible. Probably some machines will go in thermal meltdown as a result! Or should I just send them to 9.2 and 9.5 etc.
>
> Also: if students want to use packages like normaliz, can they install those on binary installs? When I do it on source-built versions, it triggers extensive recompilation.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/d1717bce-b359-4f83-902d-68edc2399d2dn%40googlegroups.com.

Matthias Koeppe

unread,
Mar 29, 2023, 12:06:26 AM3/29/23
to sage-support
On Monday, March 27, 2023 at 6:34:50 PM UTC-7 Nils Bruin wrote:
In my experience, sagelib needs rebuilding to interface with normaliz (I think it's "make normaliz pynormaliz" nowadays, or perhaps one needs a pip install).

No, there is no such build-time dependency. And "make pynormaliz" suffices; it builds normaliz and its dependencies.
 

Nils Bruin

unread,
Mar 29, 2023, 1:18:23 AM3/29/23
to sage-support
If I recall correctly, "make pynormaliz" did trigger a rebuild of sagelib, with quite a bit of cython action. This leads me to believe that it's probably nor possible to install pynormaliz via "make" in a binary distribution.

If in conda installing "pynormaliz" works fine without sagelib needing to be rebuilt then that is great. I think it does mean that in binary distributions, optional packages need to be installed via a package manager outside of sage. So "spkg" is only for source-based installs.

Matthias Koeppe

unread,
Mar 29, 2023, 4:06:25 PM3/29/23
to sage-support
On Tuesday, March 28, 2023 at 10:18:23 PM UTC-7 Nils Bruin wrote:

[...] leads me to believe that it's probably nor possible to install pynormaliz via "make" in a binary distribution.

If you install Sage from a binary distribution, then there is no relation whatsoever to a source tree of Sage.

[...] So "spkg" is only for source-based installs.

That's right.

Nils Bruin

unread,
Mar 29, 2023, 4:33:07 PM3/29/23
to sage-support
On Wednesday, 29 March 2023 at 13:06:25 UTC-7 Matthias Koeppe wrote:
On Tuesday, March 28, 2023 at 10:18:23 PM UTC-7 Nils Bruin wrote:

[...] leads me to believe that it's probably nor possible to install pynormaliz via "make" in a binary distribution.

If you install Sage from a binary distribution, then there is no relation whatsoever to a source tree of Sage.

right ... with "make" it's indeed pretty clear that it's hard to find the place where you could even run this. With "sage -i" some idle hope was raised that that would still work in a binary distribution. If it doesn't (and/or if it never did) then that would be an extra reason to deprecate it. It is currently still provided:

$ sage --help
...
Sage-the-distribution options:
  --optional          -- list all optional packages that can be installed
  --experimental      -- list all experimental packages that can be installed
  --info [packages]   -- print the SPKG.txt or SPKG.rst of the given packages,
                         and some additional information.
  -i [packages]       -- install the given Sage packages

Dima Pasechnik

unread,
Mar 29, 2023, 4:40:36 PM3/29/23
to sage-support
we should remove "sage -i". With source present, make can and should be used instead.

Without source,
"sage --python -m pip install" should be the only possible option - basically, install python packages into Sage's python package tree is the only thing which might work (with usual caveats)



--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Matthias Koeppe

unread,
Mar 29, 2023, 4:46:04 PM3/29/23
to sage-support
This part of the help comes from build/bin/sage-site. Usually in binary distributions, this is not present.
On which distribution do you see this?

 

Nils Bruin

unread,
Mar 29, 2023, 7:47:00 PM3/29/23
to sage-support
Source distribution! It didn't cross my mind this could be different on binary builds.

Hongyi Zhao

unread,
Apr 5, 2023, 11:25:42 AM4/5/23
to sage-support
The latest git version compile by myself also has the above information:

werner@X10DAi:~$ sage --help | head -1
SageMath version 10.0.beta7, Release Date: 2023-04-01
werner@X10DAi:~$ sage --help | tail -6
Reply all
Reply to author
Forward
0 new messages