Getting an error in SageMath version 9.0

55 visualizações
Pular para a primeira mensagem não lida

Dew Debra

não lida,
14 de mar. de 2023, 06:14:2314/03/2023
para sage-support
I have a script.py that worked until today, but today it gave an error, although when checking sage -v it says SageMath version 9.0, Release Date: 2020-01-01

using ubuntu 20.04

on the first line is:
from sage.all import *

error:

sage-python3 script.py
Traceback (most recent call last):
   File "/script.py", line 1, in <module>
     from sage.all import *
   File "/usr/lib/python3/dist-packages/sage/all.py", line 77, in <module>
     from cysignals.signals import (AlarmInterrupt, SignalError,
   File "/usr/lib/python3/dist-packages/cysignals/__init__.py", line 1, in <module>
     from .signals import AlarmInterrupt, SignalError, init_cysignals # noqa
ModuleNotFoundError: No module named 'cysignals.signals'sage-python3 script.py


Please tell me what is the reason for the error?

Dima Pasechnik

não lida,
14 de mar. de 2023, 06:21:5614/03/2023
para sage-s...@googlegroups.com
most probably you updated some Ubuntu packages, which broke Ubuntu's
package Sage.
Note that we are not maintaining it, it's an Ubuntu bug.

You might want to switch to a newer Sage version (9.8 is our current
release), anyway.
HTH
Dima

>
> --
> 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/eee740e0-9dcd-4f8c-82c3-27f629e06baan%40googlegroups.com.

Dew Debra

não lida,
14 de mar. de 2023, 06:38:1114/03/2023
para sage-support

How exactly to install newer Sage version (9.8 is our current
release) on Ubuntu 20.04?
вторник, 14 марта 2023 г. в 13:21:56 UTC+3, Dima Pasechnik:

Dima Pasechnik

não lida,
14 de mar. de 2023, 06:42:2714/03/2023
para sage-s...@googlegroups.com
On Tue, Mar 14, 2023 at 10:38 AM Dew Debra <mob...@gmail.com> wrote:
>
>
> How exactly to install newer Sage version (9.8 is our current
> release) on Ubuntu 20.04?

https://doc.sagemath.org/html/en/installation/index.html#linux

The easiest might be via conda-forge:
https://doc.sagemath.org/html/en/installation/conda.html#installing-all-of-sagemath-from-conda-not-for-development

Dew Debra

não lida,
14 de mar. de 2023, 07:06:0914/03/2023
para sage-support
Can you help me.

I updated the cysignals module

through

pip3 install cysignals

Now I am getting this error:

sage -python3 script.py

Traceback (most recent call last):
  File "/script.py", line 1, in <module>
    from sage.all import *
  File "/usr/lib/python3/dist-packages/sage/all.py", line 83, in <module>
    import sage.misc.lazy_import
ModuleNotFoundError: No module named 'sage.misc.lazy_import'

Now how do I install 'sage.misc.lazy_import' ???


вторник, 14 марта 2023 г. в 13:42:27 UTC+3, Dima Pasechnik:

Dima Pasechnik

não lida,
14 de mar. de 2023, 07:23:3314/03/2023
para sage-s...@googlegroups.com
On Tue, Mar 14, 2023 at 11:06 AM Dew Debra <mob...@gmail.com> wrote:
>
> Can you help me.
>
> I updated the cysignals module
>
> through
>
> pip3 install cysignals

after this, nothing is guaranteed. You might want to revert this.
> --
> 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/30b5d09f-aa4e-4100-9ab0-dff49b00db0an%40googlegroups.com.

Dew Debra

não lida,
14 de mar. de 2023, 07:28:1314/03/2023
para sage-support
How can I replace a line in code:

from sage.all import *

to make the script work?

вторник, 14 марта 2023 г. в 14:23:33 UTC+3, Dima Pasechnik:

Dima Pasechnik

não lida,
14 de mar. de 2023, 07:34:4814/03/2023
para sage-s...@googlegroups.com
On Tue, Mar 14, 2023 at 11:28 AM Dew Debra <mob...@gmail.com> wrote:
>
> How can I replace a line in code:
>
> from sage.all import *
>
> to make the script work?

you are using Sage, right? Then, needless to say, you need to import
things from sage, although
"import *" may be a bit of overkill.
In short - you really cannot do this.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/6ea01f85-32cf-4342-bd90-ba938ab3f08bn%40googlegroups.com.

Dew Debra

não lida,
14 de mar. de 2023, 07:40:0914/03/2023
para sage-support
What should I do in this case when I can only install Sage through the terminal using the command:

sudo apt-get install sagemath

It's very strange since everything was working until today, and now I'm getting an error.
Help how to fix it?

вторник, 14 марта 2023 г. в 14:34:48 UTC+3, Dima Pasechnik:

dim...@gmail.com

não lida,
14 de mar. de 2023, 07:49:0314/03/2023
para sage-s...@googlegroups.com
On Tue, Mar 14, 2023 at 04:40:09AM -0700, Dew Debra wrote:
> What should I do in this case when I can only install Sage through the
> terminal using the command:
>
> sudo apt-get install sagemath
>
> It's very strange since everything was working until today, and now I'm
> getting an error.
> Help how to fix it?
>
Nothing strange - you updated some python packages in Sage, which are not compatible with Sage 9.0, so you broke
it this way.

uninstall cysignals using pip, possibly other packages in Sage that you updated using pip.
This hopefully will fix it.


Dew Debra

não lida,
14 de mar. de 2023, 15:43:2114/03/2023
para sage-support
I need to install SageMath version 9.7 in Google Colab, can this be done via sudo apt-get install sagemath ? What exactly needs to be changed in the team?

вторник, 14 марта 2023 г. в 14:49:03 UTC+3, dim...@gmail.com:

Dima Pasechnik

não lida,
14 de mar. de 2023, 19:34:4714/03/2023
para sage-s...@googlegroups.com
On Tue, Mar 14, 2023 at 7:43 PM Dew Debra <mob...@gmail.com> wrote:
>
> I need to install SageMath version 9.7 in Google Colab, can this be done via sudo apt-get install sagemath ? What exactly needs to be changed in the team?

Google Colab is just a cloud UI to Python, you can't really "install"
anything there. You can connect it to a machine where you have your
Python+Jupyter, perhaps with Sage installed, but Sage's installation
there has nothing to do with Colab (except it provides Jupyter
kernel that needs to be in proper place, etc).

And, in English "team" is different from "command", and from "order" :-)
Please check your automatically translated messages so that they
make sense.

>
> <>, 14 марта 2023 г. в 14:49:03 UTC+3, dim...@gmail.com:
>>
>> On Tue, Mar 14, 2023 at 04:40:09AM -0700, Dew Debra wrote:
>> > What should I do in this case when I can only install Sage through the
>> > terminal using the command:
>> >
>> > sudo apt-get install sagemath
>> >
>> > It's very strange since everything was working until today, and now I'm
>> > getting an error.
>> > Help how to fix it?
>> >
>> Nothing strange - you updated some python packages in Sage, which are not compatible with Sage 9.0, so you broke
>> it this way.
>>
>> uninstall cysignals using pip, possibly other packages in Sage that you updated using pip.
>> This hopefully will fix it.
>>
>>
> --
> 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/698e3c2c-0efc-4170-a1ae-9ad569ea7ecfn%40googlegroups.com.
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem