Freshly installed sage crashes

45 views
Skip to first unread message

Michel VAN DEN BERGH

unread,
Aug 13, 2023, 4:14:14 PM8/13/23
to sage-support
Hi,

Today I installed sage on Ubuntu 22.04 using

apt install sagemath

Sadly after typing 'sage' the program crashes. The crash seems to be related to Cython. I am attaching the crash report.

What are my options?

Best regards,
Michel




crash_bca7locr.log

Jan Groenewald

unread,
Aug 13, 2023, 4:55:16 PM8/13/23
to sage-s...@googlegroups.com
Hi

Does this happen with a user other than your own? Even root will do for a quick test.
Perhaps pip installed packages or other repositories are conflicting. Also try
LC_ALL=C sage

Regards,
Jan



--
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/bd9d3fb3-d8f8-4a55-b51c-38ea8e8d0de5n%40googlegroups.com.

Michel VAN DEN BERGH

unread,
Aug 14, 2023, 8:32:33 AM8/14/23
to sage-support
I was unable to get the distro sage to work. I compiled sage from source and this solved the problem. Sad though since I would have preferred to use the distro version.

Henri Girard

unread,
Aug 14, 2023, 8:45:32 AM8/14/23
to sage-s...@googlegroups.com

Did you make a link to your compiled version ?

I compiled sage in sage (which us the base dir) after I sudo ln -s /sage /usr/bin/sage then you get sage wide

I installed the ubuntu version which is working fine : sudo apt install sagemath* jupyter* to get all libs working

hope that can help

best

Henri

Dima Pasechnik

unread,
Aug 14, 2023, 11:41:51 AM8/14/23
to sage-support


On Mon, 14 Aug 2023, 09:32 'Michel VAN DEN BERGH' via sage-support, <sage-s...@googlegroups.com> wrote:
I was unable to get the distro sage to work. I compiled sage from source and this solved the problem. Sad though since I would have preferred to use the distro version.

we are not involved in building distribution packages - this should be an Ubuntu bug report.


On Sunday, August 13, 2023 at 6:55:16 PM UTC+2 Jan Groenewald wrote:
Hi

Does this happen with a user other than your own? Even root will do for a quick test.
Perhaps pip installed packages or other repositories are conflicting. Also try
LC_ALL=C sage

Regards,
Jan



On Sun, 13 Aug 2023 at 18:14, 'Michel VAN DEN BERGH' via sage-support <sage-s...@googlegroups.com> wrote:
Hi,

Today I installed sage on Ubuntu 22.04 using

apt install sagemath

Sadly after typing 'sage' the program crashes. The crash seems to be related to Cython. I am attaching the crash report.

What are my options?

Best regards,
Michel




--
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/bd9d3fb3-d8f8-4a55-b51c-38ea8e8d0de5n%40googlegroups.com.

--
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.

Michel VAN DEN BERGH

unread,
Aug 15, 2023, 5:58:37 AM8/15/23
to sage-support
On Monday, August 14, 2023 at 1:41:51 PM UTC+2 Dima Pasechnik wrote:


On Mon, 14 Aug 2023, 09:32 'Michel VAN DEN BERGH' via sage-support, <sage-s...@googlegroups.com> wrote:
I was unable to get the distro sage to work. I compiled sage from source and this solved the problem. Sad though since I would have preferred to use the distro version.

we are not involved in building distribution packages - this should be an Ubuntu bug report.

Fair enough. Next time I try and it still doesn't work I will file one!

Michel VAN DEN BERGH

unread,
Aug 15, 2023, 6:11:35 AM8/15/23
to sage-support
On Monday, August 14, 2023 at 10:45:32 AM UTC+2 Henri Girard wrote:

Did you make a link to your compiled version ?

I compiled sage in sage (which us the base dir) after I sudo ln -s /sage /usr/bin/sage then you get sage wide


I don't use the sage executable, but I do "import sage" inside the python interpreter (I only run scripts). This used to work with the distro sage, but I have not found how to make that work with the compiled sage.  Do you know how to achieve this?

Michel


 

I installed the ubuntu version which is working fine : sudo apt install sagemath* jupyter* to get all libs working

hope that can help

best

Henri

--

Michel VAN DEN BERGH

unread,
Aug 15, 2023, 6:41:56 AM8/15/23
to sage-support
On Tuesday, August 15, 2023 at 8:11:35 AM UTC+2 Michel VAN DEN BERGH wrote:
On Monday, August 14, 2023 at 10:45:32 AM UTC+2 Henri Girard wrote:

Did you make a link to your compiled version ?

I compiled sage in sage (which us the base dir) after I sudo ln -s /sage /usr/bin/sage then you get sage wide


I don't use the sage executable, but I do "import sage" inside the python interpreter (I only run scripts). This used to work with the distro sage, but I have not found how to make that work with the compiled sage.  Do you know how to achieve this?

Michel

I did some investigating and it seems that the distro sage installs sage as an honest module (it is in the file system as /usr/lib/python3/dist-packages/sage/) whereas the python that comes with the compiled sage has sage as a built-in module (it seems to be not in the file system). So it is not accessible to the global python I think.

The following is for the sage python.

$ sage --python
>>> import sage
>>> import inspect
>>> inspect.getfile(sage)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sage_user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/inspect.py", line 901, in getfile
    raise TypeError('{!r} is a built-in module'.format(object))
TypeError: <module 'sage' (<_frozen_importlib_external.NamespaceLoader object at 0x7fa4431b2550>)> is a built-in module
>>>




 

Dima Pasechnik

unread,
Aug 15, 2023, 7:29:04 AM8/15/23
to sage-support


On Tue, 15 Aug 2023, 07:41 'Michel VAN DEN BERGH' via sage-support, <sage-s...@googlegroups.com> wrote:


On Tuesday, August 15, 2023 at 8:11:35 AM UTC+2 Michel VAN DEN BERGH wrote:
On Monday, August 14, 2023 at 10:45:32 AM UTC+2 Henri Girard wrote:

Did you make a link to your compiled version ?

I compiled sage in sage (which us the base dir) after I sudo ln -s /sage /usr/bin/sage then you get sage wide


I don't use the sage executable, but I do "import sage" inside the python interpreter (I only run scripts). This used to work with the distro sage, but I have not found how to make that work with the compiled sage.  Do you know how to achieve this?

Michel

I did some investigating and it seems that the distro sage installs sage as an honest module (it is in the file system as /usr/lib/python3/dist-packages/sage/) whereas the python that comes with the compiled sage has sage as a built-in module (it seems to be not in the file system). So it is not accessible to the global python I think.

The following is for the sage python.

You need to either make symbolic link to the place you build Sage from source,
 or just cd to that location, and run

./sage --python



$ sage --python
>>> import sage
>>> import inspect
>>> inspect.getfile(sage)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sage_user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/inspect.py", line 901, in getfile
    raise TypeError('{!r} is a built-in module'.format(object))
TypeError: <module 'sage' (<_frozen_importlib_external.NamespaceLoader object at 0x7fa4431b2550>)> is a built-in module
>>>




 

--
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.

Jan Groenewald

unread,
Aug 15, 2023, 9:50:10 AM8/15/23
to sage-s...@googlegroups.com
Hi

A quick web search does not bring up results pointing at the sagemath package being broken on Ubuntu 22.04.
My guess is that it is something else on your system.

Regards,
Jan



Michel VAN DEN BERGH

unread,
Aug 15, 2023, 10:42:04 AM8/15/23
to sage-support
On Tuesday, August 15, 2023 at 11:50:10 AM UTC+2 Jan Groenewald wrote:
Hi

A quick web search does not bring up results pointing at the sagemath package being broken on Ubuntu 22.04.
My guess is that it is something else on your system.

Regards,
Jan

On my laptop the sagemath package works.  However I have issues installing it on my desktop. An obvious guess is that the CPU is too old. It is an Intel Core 2 Duo E8400 (which was launched in January 2008).   One can imagine that the distro sage is compiled with certain optimizations which are not supported by my CPU.

Michel


.

Michel VAN DEN BERGH

unread,
Aug 15, 2023, 10:45:33 AM8/15/23
to sage-support
I think I found a relevant report


The error reported there is similar to what I am seeing.

Michel

 

.

Jan Groenewald

unread,
Aug 15, 2023, 11:27:40 AM8/15/23
to sage-s...@googlegroups.com
Hi

Yes, the old CPU is the most likely answer.

I have a lab full of duo core which started crashing a year or two ago (some parts of sage at least, like anything using numpy),
which you found in an old report of mine.

Regards,
Jan

--
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.
Reply all
Reply to author
Forward
0 new messages