Ask Your Question

arty-hlr's profile - activity

2021-03-29 02:22:43 +0200 received badge  Nice Question (source)
2021-01-29 15:12:29 +0200 received badge  Popular Question (source)
2020-08-25 02:39:42 +0200 received badge  Notable Question (source)
2020-08-25 02:39:42 +0200 received badge  Famous Question (source)
2020-01-04 10:47:59 +0200 commented question Sage error from module `typing` and python 3.8

I've seen that, but it doesn't explain why sage segfaults if typing is not installed, nor what solution there could be.

2020-01-02 19:09:35 +0200 asked a question Sage error from module `typing` and python 3.8

Hi,

I installed sage from sagemath-git on AUR with python 3.8, and I have this error upon launching sage:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01                     │
│ Using Python 3.8.1. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "/usr/bin/sage-ipython", line 12, in <module>
    from sage.repl.interpreter import SageTerminalApp
  File "/usr/lib/python3.8/site-packages/sage/repl/interpreter.py", line 106, in <module>
    from sage.repl.prompts import InterfacePrompts
  File "/usr/lib/python3.8/site-packages/sage/repl/prompts.py", line 16, in <module>
    from IPython.terminal.prompts import Prompts
  File "/usr/lib/python3.8/site-packages/IPython/__init__.py", line 56, in <module>
    from .terminal.embed import embed
  File "/usr/lib/python3.8/site-packages/IPython/terminal/embed.py", line 14, in <module>
    from IPython.core.magic import Magics, magics_class, line_magic
  File "/usr/lib/python3.8/site-packages/IPython/core/magic.py", line 22, in <module>
    from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2
  File "/usr/lib/python3.8/site-packages/IPython/core/inputtransformer2.py", line 16, in <module>
    from typing import List, Tuple, Union
  File "/usr/lib/python3.8/site-packages/typing.py", line 1357, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/usr/lib/python3.8/site-packages/typing.py", line 1005, in __new__
    self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'

Which seems to be a problem relative to the typing package, whose version is 3.7.4. I googled that _abc_registry issue and it seems to be an issue for python 3.7 as well, so not sure if it's specific to the fact that I have python 3.8 on my system. Uninstalling typing with pip just causes a segfault, even after rebuilding sage.

2020-01-02 17:48:22 +0200 commented question sage not starting due to sage.misc missing

The only problem seems to be that typing python module, how is that not being ready for python3.8? Having to downgrade to 3.7 just for sage will a pain, I really hope it does not come to this.

2020-01-02 17:17:19 +0200 received badge  Editor (source)
2020-01-02 15:53:58 +0200 received badge  Popular Question (source)
2020-01-02 15:52:52 +0200 asked a question sage not starting due to sage.misc missing

Hi,

after having used sage successfully for the past year, the last times I tried to install it showed me this when running sage:

$sage Traceback (most recent call last): File "/usr/bin/sage-ipython", line 9, in <module> from sage.misc.banner import banner ModuleNotFoundError: No module named 'sage.misc

But sage -v runs: SageMath version 9.0, Release Date: 2020-01-01

This happens on sage 8.9 installed with pacman, the 8.9 binary release for Ubuntu 18.04 64 bits, and sage 9.0 installed from yay -S sagemath-git. I couldn't find any other issue of that type online, so posting here seemed like the next step to solving this.

I tried sage -i misc or sage -i sage.misc or even with pip, but nothing works, and I'm at a loss at the moment! The only solution I have at the moment is using a docker container to run sage haha.

Thanks in advance!

EDIT:

After changing my PYTHONPATH to /usr/lib/python3.8/site-packages/, it now finds sage modules, but I get that error message instead:

Traceback (most recent call last): File "/usr/bin/sage-ipython", line 12, in <module> from sage.repl.interpreter import SageTerminalApp File "/usr/lib/python3.8/site-packages/sage/repl/interpreter.py", line 106, in <module> from sage.repl.prompts import InterfacePrompts File "/usr/lib/python3.8/site-packages/sage/repl/prompts.py", line 16, in <module> from IPython.terminal.prompts import Prompts File "/usr/lib/python3.8/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/usr/lib/python3.8/site-packages/IPython/terminal/embed.py", line 14, in <module> from IPython.core.magic import Magics, magics_class, line_magic File "/usr/lib/python3.8/site-packages/IPython/core/magic.py", line 22, in <module> from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2 File "/usr/lib/python3.8/site-packages/IPython/core/inputtransformer2.py", line 16, in <module> from typing import List, Tuple, Union File "/usr/lib/python3.8/site-packages/typing.py", line 1357, in <module> class Callable(extra=collections_abc.Callable, metaclass=CallableMeta): File "/usr/lib/python3.8/site-packages/typing.py", line 1005, in __new__ self._abc_registry = extra._abc_registry AttributeError: type object 'Callable' has no attribute '_abc_registry'

2019-08-14 13:40:11 +0200 received badge  Student (source)
2019-08-13 09:47:39 +0200 asked a question Import sage in python3

Hi,

I've just finished building sage from source with python3, and it works great! I'm just wondering why from sage.all import * doesn't work in my python3, although trying the same in the sage shell works, so I guess it has to be a matter of environment variables? What should I do to be able to import sage in python3 scripts without having to rely on a sage shell?

Best,

Florian