Will sagemath return to the Fedora 39 repository?

I upgraded from Fedora 38 to 39 without paying close attention to the warnings about incompatible packages on my system (rookie mistake). After upgrading, I realized that sagemath is not in the Fedora 39 repository. Is this permanent or could sagemath come back in the near future?

I have consulted the Fedora Package Source page, but I am not sure how to properly read the info. It looks to me like sagemath has been abandoned.

Also, I do not see sagemath listed for Fedora 39 on repology.org.

I have tried to install sagemath in a virtual environment using pip as outlined in the link below, but that method failed as well.

Is it time for me to switch to a different distribution that is still actively packaging sagemath?

The primary maintainer for sagemath stopped actively maintaining the package years ago. I filled in for him for awhile to keep it working. Two years ago, I announced in several forums that I was not interested in keeping that up indefinitely and asked for someone who actually uses sagemath to step up and do the maintenance. I gave a 1 year deadline for that to happen. Nobody stepped up. I actually kept maintenance going for another year and a half before concluding that the sagemath user community simply isn’t interested in keeping sagemath in Fedora. If you would like to see sagemath in Fedora, please volunteer to maintain the package. Or get a group of sagemath users together and share the maintenance burden between you. I can help you get started if you would like to do so.

1 Like

Thank you for your reply. Unfortunately, I don’t know anything about packaging software. How much technical skill is required, and what is your estimate on the amount of time it would take to properly maintain a project like sagemath?

I won’t lie to you: there is a learning curve for sure. For someone with no packaging experience, taking on a package as complex as sagemath would be a challenge. It can be done, and as I said, I am willing to help, but it would take a fair amount of work to get started.

As for time: the sagemath package actually took very little time most of the year, except for when a new version of sagemath was released, or (in the most recent case) a new version of python was released that broke sagemath. In those cases, it could take hours to get everything sorted out and a new build pushed. But then there would be nothing at all to do for months at a time.

Let me do a bit of research first. Is this a good place to start?

Also, when a new version of sagemath (or python) is released, what is the time frame expectation for having a new build pushed?

Note that the bug 2220593 – F39FailsToInstall: sagemath-core, sagemath-sagetex indicates sagemath requires python 3.11 and Fedora 39 has moved to python 3.12.

Since that package is orphaned the only fix for use on fedora 39+ would be to have someone pick it up for maintenance and upgrade the code to work on python 3.12. This was indicated by @jjames above.

If you are capable this is a good time to get involved, or to find someone who can do the required coding and commit to maintaining that package. Otherwise it seems it will only work on systems that still use python 3.11.

I’m busy until mid-December (I’m a graduate student with exams coming up) but I’d be willing to help maintain sagemath after that, so if anyone is considering picking it up I’d be happy to help as a comaintainer.

As for the python version, Sagemath is currently on release candidates for Sage 10.2, and is planning python 3.12 support for Sage 10.3: ReleaseTours - Sagemath Wiki

Could Sagemath be packaged in Fedora 39 with Python 3.11 as a dependency in the meantime?

You followed the wrong installation guide. Follow these steps.

Step 1 download mamba

curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh

Step 2 install mamba

sh Mambaforge-$(uname)-$(uname -m).sh

Step 3 install sage in a python 3.11 environment

mamba create -n sage sage python=3.11

Step 4 activate sage environment

mamba activate sage

Step 5 use sage


Whenever you restart or deactivate the sage environment you just have to repeat steps 4 & 5. Or you could add step 4 to your bashrc.


According to the post by Sam (@onebitbrain ) above it can be installed now. Just have to follow the link and instructions he provided to install in in a python 3.11 venv.

Thank you everyone for your quick and insightful responses. After doing a bit more research, I have decided to shift my workflow from sagemath to sympy, at least until sagemath supports python 3.12.

If sympy does what you need it’s a great solution.

As for sagemath: It bundles together so many individual packages that you can think of it as a “partial distribution”. I admire our maintainers for being able to unbundle this and to tie it together again (as individual Fedora packages which work together in their various versions). I’m wondering how sustainable this is in the future, though.

For these reasons, and also for reasons of reproducibility, many people in scientific computing and data science use “container type environments” so that you can fulfill different requirements of different apps/packages without conflicts and without having them in your system installation: python virtual environments (venv etc [virtualenv/poetry can do different py versions] ), binary packaging (mamba/conda [see above]), containers (toolbox [use an F38 toolbox for now]).

So, this might be something to look into in the future.

This is fallout from the Python3.13 eucatastrophe.

If somebody does decide to try to bring back the sagemath package at some point in the future, I am willing to share what I know to help the process along. Get in touch with me at any time.


Thanks for the advice. Honestly, I probably should have been using SymPy from the start. I’m just a humble high school mathematics teacher, and SymPy seems to have all the CAS capabilities that my students and I require. It also has the benefit of using pure python syntax.

Frankly, I am kinda glad this whole thing happened. It has allowed me to learn a new tool that will be a much better match to my needs.

I am familiar with venv, but I was not sure how to create one a virtual environment that uses a different py version than the system py. If I run into more issues in the future, I will look into one of your suggestions. Thanks again.

I’m interested in mantaining the sagemath package for Fedora, but I will need some help and I have a first question: I think that Sagemath 10.2 doesn’t support python 3.12, then to build anRPM for Fedora, I have to install python 3.11?

Thanks in advance

Hi Rafel, I’ve already looked into that a little bit, since I was also thinking of maintaining the sagemath package (but I’d prefer to be comaintainer if anyone else is interested in it since I have no prior Linux packaging experience).

You might be able to do that on your own machine, but it wouldn’t be allowed for Fedora’s repositories. Fedora python packages “MUST NOT depend on other versions of the CPython interpreter than the current python3” (Python Packaging Guidelines :: Fedora Docs).

So practically we have three options I can see:

  1. Wait until Sagemath supports Python 3.12, which is on the roadmap for the next Sagemath update (Sagemath 10.3)
  2. Contribute upstream so that Sagemath 10.3 releases faster
  3. Patch Sagemath 10.2 in Fedora to support Python 3.12

Also feel free to email me and we can coordinate possibly maintaining Sagemath together. You can find my email on my GitLab profile page: Vincent Macri · GitLab

I Vincent,
I’ve never maintained a package for Fedora, so as a first step I wil try to generate an RPM package for sage 10.2 on Fedora 38 and wait until 10.3 or 10.3 beta for Fedora 39

I would like to maintain the sagemath package for Fedora. If someone is already working on it, i would like to help and contribute if possible.

I built sage-10.2 on Fedora 39 using a conda environment with python1.10, following the
Instructions to Build from Source. I have built sage from source a few times before retiring in 2018, and the procedure hasn’t changed much.

First issue:

sage: plot(x^2)
/home/gnw3/Projects/sage/sage-10.2/src/sage/repl/rich_output/display_manager.py:612: RichReprWarning: Exception in _rich_repr_ while displaying object: libbz2.so.1.0: cannot open shared object file: No such file or directory
Graphics object consisting of 1 graphics primitive

explained by:

% ls -l ~/.conda/envs/sage/lib/libbz2.so* 
lrwxrwxrwx. 1 gnw3 gnw3    15 Dec  7 14:58 /home/gnw3/.conda/envs/sage/lib/libbz2.so -> libbz2.so.1.0.8
lrwxrwxrwx. 1 gnw3 gnw3    15 Dec  7 14:58 /home/gnw3/.conda/envs/sage/lib/libbz2.so.1.0 -> libbz2.so.1.0.8
-rwxrwxr-x. 3 gnw3 gnw3 83576 Jul 15  2019 /home/gnw3/.conda/envs/sage/lib/libbz2.so.1.0.8


% ls -l /usr/lib64/libbz2.so* 
lrwxrwxrwx. 1 root root    11 Jul 19 21:00 /usr/lib64/libbz2.so -> libbz2.so.1
lrwxrwxrwx. 1 root root    15 Jul 19 21:00 /usr/lib64/libbz2.so.1 -> libbz2.so.1.0.8
-rwxr-xr-x. 1 root root 80616 Jul 19 21:00 /usr/lib64/libbz2.so.1.0.8

This was days ago, but I haven’t found time to investigate further.

Since the original issue was solved by using sympy, discussion of building and packaging sagemath should move to a new thread.