Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

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