how to install optional packages in a conda install

54 views
Skip to first unread message

John Cremona

unread,
Sep 2, 2026, 12:26:06 PMSep 2
to SAGE devel
I have just successfully installed sage (a development version, i.e.
editable) using the installation instructions at
https://doc.sagemath.org/html/en/developer/walkthrough.html. This is
on a new linux (ubuntu) computer where I had already installed (for my
own purposes independent of Sage) NTL, FLINT, PARI and eclib, but not
much else yet. I used the conda method for installation, the first
time I have ever (to my knowledge) used this system. (Previously I
had always gone down the "bootstrap/configure/make" route.)


One tiny thing about the instructions for installing conda, which were
generally fine: after installing conda, my shell did not find the
command "conda" as required, but in a new shell this was fine, owing
to the extra lines the conda installation adds to .bashrc. Perhaps
the guide should say something about that.


My main question is how to install optional packages, such as
database_cremona_ellcurve? I tried "make database_cremona_ellcurve"
but that does not work as "configure" has not been run.


I next tried "./sage -i database_cremona_ellcurve" which was the old
way to do this but that did not work either. It did at least give
some details as to why, and told me to use ./sage --pip install. That
did not work either. Another suggestion was to use "conda install" but
"conda install database_cremona_ellcurve" failed with a "package not
found error".


There obviously is a way to do this, so what I am asking is (1) what
to do to install optional spkgs and (2) add this to the documentation
(which still says to use "sage -i"), or tell me where in the docs it
is explained.


When I have sorted all this out I will next need to know how to
(re)package the standard package eclib which is overdue a new release.
I'm sure there will be help for that on sage-devel!


John

Dima Pasechnik

unread,
Sep 2, 2026, 1:43:57 PMSep 2
to sage-...@googlegroups.com, John Cremona, David Roe
On Wed, Sep 2, 2026 at 11:26 AM John Cremona <john.c...@gmail.com> wrote:
>
> I have just successfully installed sage (a development version, i.e.
> editable) using the installation instructions at
> https://doc.sagemath.org/html/en/developer/walkthrough.html. This is
> on a new linux (ubuntu) computer where I had already installed (for my
> own purposes independent of Sage) NTL, FLINT, PARI and eclib, but not
> much else yet. I used the conda method for installation, the first
> time I have ever (to my knowledge) used this system. (Previously I
> had always gone down the "bootstrap/configure/make" route.)
>
>
> One tiny thing about the instructions for installing conda, which were
> generally fine: after installing conda, my shell did not find the
> command "conda" as required, but in a new shell this was fine, owing
> to the extra lines the conda installation adds to .bashrc. Perhaps
> the guide should say something about that.
>
>
> My main question is how to install optional packages, such as
> database_cremona_ellcurve? I tried "make database_cremona_ellcurve"
> but that does not work as "configure" has not been run.
>
>
> I next tried "./sage -i database_cremona_ellcurve" which was the old
> way to do this but that did not work either. It did at least give
> some details as to why, and told me to use ./sage --pip install. That
> did not work either. Another suggestion was to use "conda install" but
> "conda install database_cremona_ellcurve" failed with a "package not
> found error".
see https://anaconda.org/channels/conda-forge/packages/sagemath-db-elliptic-curves/overview

conda install conda-forge::sagemath-db-elliptic-curves

will install " A small subset of the data in John Cremona's database
of elliptic curves up to conductor 10000 and William Stein's database
of interesting curves
"

creating pip packages for Sage's databases is currently WIP:
https://github.com/sagemath/sage/issues/42722




>
>
> There obviously is a way to do this, so what I am asking is (1) what
> to do to install optional spkgs and (2) add this to the documentation
> (which still says to use "sage -i"), or tell me where in the docs it
> is explained.
>
>
> When I have sorted all this out I will next need to know how to
> (re)package the standard package eclib which is overdue a new release.
> I'm sure there will be help for that on sage-devel!

Create a new github release of eclib - nothing will move forward on it
until it's done.
Then, packagers of Conda, Linux distros, Homebrew, etc will take a
note (hopefully)
And open an issue on sagemath/sage github

I don't think anything changed in this regard.

Dima

>
>
> John
>
> --
> 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+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/CAD0p0K5-7TN2dSgowrGEOQVSz7jo-iQe9MXaRsSM9f29m0TqDA%40mail.gmail.com.

Nils Bruin

unread,
Sep 2, 2026, 3:52:54 PMSep 2
to sage-devel
On Wednesday, 2 September 2026 at 09:26:06 UTC-7 john.c...@gmail.com wrote:

One tiny thing about the instructions for installing conda, which were
generally fine: after installing conda, my shell did not find the
command "conda" as required, but in a new shell this was fine, owing
to the extra lines the conda installation adds to .bashrc. Perhaps
the guide should say something about that.

When I tried a conda install (on a machine where I am not interested in development), I wanted it installed in such a way that it would be usable for other users on the system as well--basically a system install. I therefore did NOT want to rely on conda scribbling in my bashrc and I didn't want to touch system-wide shell configuration files either. So when I ran conda I ended up declining this scribbling. Instead, I wrote a wrapper for the sage shell script to activate conda *there* (which is the only place where it should be needed):

$ cat ~/bin/sage
#!/bin//bash
eval "$(/opt/miniforge3/bin/mamba shell hook --shell bash)"
mamba activate sage
exec sage "$@" 

The location "/opt/miniforge3/bin/" is of course entirely install-dependent, but the rest should be pretty generic. I think some version of this "hack", or a cleaner alternative method, would be worth having documented. The "conda" install method is in principle quite useful for individual users but since it's now basically the main way of getting a "binary sage install" it would be worth having it adapted as a "system-wide install method" as well. I don't think we have other more convenient methods for such usage scenarios.
Reply all
Reply to author
Forward
0 new messages