No module named 'sage.all_cmdline'

1,254 views
Skip to first unread message

Dew Debra

unread,
Sep 14, 2021, 1:50:56 PM9/14/21
to sage-support
I installed "Sage" on Google Colab

via the command:  

!sudo apt-get install build-essential m4 dpkg-dev
!sudo apt-get update 
!sudo apt-get install sagemath

I get the error:  

  File "script.py", line 11, in <module>
    from sage.all_cmdline import *   
ModuleNotFoundError: No module named 'sage.all_cmdline'

Google Colab works on
Description: Ubuntu 18.04.5 LTS
Codename: bionic
model name: AMD EPYC 7B12


Why can't I install "Sage" ? What could be the reasons for this error?

Dima Pasechnik

unread,
Sep 14, 2021, 2:01:57 PM9/14/21
to sage-support
Hello,

On Tue, Sep 14, 2021 at 6:50 PM Dew Debra <mob...@gmail.com> wrote:
>
> I installed "Sage" on Google Colab
> https://askubuntu.com/a/1159008/1033768
>
> via the command:
>
> !sudo apt-get install build-essential m4 dpkg-dev
> !sudo apt-get update
> !sudo apt-get install sagemath
>
> I get the error:
>
> File "script.py", line 11, in <module>
> from sage.all_cmdline import *
> ModuleNotFoundError: No module named 'sage.all_cmdline'

What are you doing to get this error? It's not clear from your report.
How do you try to start Sage?


>
> Google Colab works on
> Description: Ubuntu 18.04.5 LTS
> Codename: bionic
> model name: AMD EPYC 7B12
>
>
> Why can't I install "Sage" ? What could be the reasons for this error?
>
> --
> 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/1e0a4497-4bcc-495c-824d-542094d970b5n%40googlegroups.com.

Matthias Koeppe

unread,
Sep 14, 2021, 2:09:47 PM9/14/21
to sage-support
Report Ubuntu packaging bugs to Ubuntu.

Dima Pasechnik

unread,
Sep 14, 2021, 2:24:02 PM9/14/21
to sage-support
On Tue, Sep 14, 2021 at 7:09 PM Matthias Koeppe
<matthia...@gmail.com> wrote:
>
> Report Ubuntu packaging bugs to Ubuntu.

this is more interesting - the thing is run from Colab's ipython notebook,
i.e. on https://colab.research.google.com/....

Let me try if I can manage to install Sage there, one or another way.
> --
> 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/40da8d16-4718-4365-9786-4d1411884b46n%40googlegroups.com.

Dew Debra

unread,
Sep 14, 2021, 5:13:22 PM9/14/21
to sage-support
I used the command
!sudo apt-get install sagemath

Can you explain what a module named 'sage.all_cmdline' is?

вторник, 14 сентября 2021 г. в 21:24:02 UTC+3, dim...@gmail.com:

Dima Pasechnik

unread,
Sep 14, 2021, 5:29:34 PM9/14/21
to sage-support
On Tue, Sep 14, 2021 at 10:13 PM Dew Debra <mob...@gmail.com> wrote:
>
> All right
> https://colab.research.google.com
> I used the command
> !sudo apt-get install sagemath
>
> Can you explain what a module named 'sage.all_cmdline' is?

I don't know, does

import sage


work for you after the installation?
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/5b98935d-e348-41aa-907d-64700c536982n%40googlegroups.com.

Dima Pasechnik

unread,
Sep 14, 2021, 5:40:28 PM9/14/21
to sage-support
On Tue, Sep 14, 2021 at 10:29 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Tue, Sep 14, 2021 at 10:13 PM Dew Debra <mob...@gmail.com> wrote:
> >
> > All right
> > https://colab.research.google.com
> > I used the command
> > !sudo apt-get install sagemath
> >
> > Can you explain what a module named 'sage.all_cmdline' is?
>
> I don't know, does
>
> import sage
>
>
> work for you after the installation?

In fact, it won't work, as on Ubuntu 18.04 one has Sage 8.1, still
based on Python2, and
certainly you cannot expect this to work in Python3 notebook.

Your best bet would be to install Conda, and use it to install Sage.
Reply all
Reply to author
Forward
0 new messages