SageMath on Fedora32 works with errors!

asked 2020-05-04 13:07:13 +0100

aszanti gravatar image

updated 2020-05-04 19:39:48 +0100

You cannot define a function! for example: after f (x) = x ^ 2 + 1 we get the error:

TypeError Traceback (most recent call last)

/usr/lib64/python3.8/codeop.py in __call __ (self, source, filename, symbol)

     134
     135 def __call __ (self, source, filename, symbol):
-> 136 codeob = compile (source, filename, symbol, self.flags, 1)

     137 for feature in _features:
     138 if codeob.co_flags & feature.compiler_flag:
TypeError: required field "type_ignores" missing from Module
edit retag flag offensive close merge delete

Comments

2

Sage is not yet compatible with Python 3.8. That might be the problem.

John Palmieri gravatar imageJohn Palmieri ( 2020-05-04 19:40:23 +0100 )edit

Thanks for the answer. Is there a workaround for this problem? I hope this will be fixed soon.

aszanti gravatar imageaszanti ( 2020-05-05 13:58:39 +0100 )edit

Please check the environment variables in a fresh session. Best do not set any python path when starting the terminal starting the ipyton session. In my case, for instance:

sage: import re, os                                                                                                                                           
sage: for k, v in os.environ.items(): 
....:     if re.search('SAGE', k) or re.search('PY.*PAT', k): 
....:         print(f"environ variable {k:<20s} -> {v}") 
....:                                                                                                                                                         
environ variable DOT_SAGE             -> /home/dan/.sage
dan_fulea gravatar imagedan_fulea ( 2020-05-14 17:48:22 +0100 )edit

Thanks for your suggestion. Here is my environment: environ variable SAGE_PYTHON3 -> yes ..... environ variable SAGE_ETC -> /usr/share/sagemath/etc environ variable DOT_SAGE -> /home/aszanti/.sage

In terminal the ipyton session all is well. The problem and the described error occur in the Jupyter notebook. $ sage -n jupyter

aszanti gravatar imageaszanti ( 2020-05-16 22:44:48 +0100 )edit

It's already great. After updating the application, everything works well in the notebook. SAGE is good! Thx

aszanti gravatar imageaszanti ( 2020-05-24 15:12:02 +0100 )edit