SageMath on Fedora32 works with errors!

asked 2020-05-04 06:07:13 -0600

aszanti gravatar image

updated 2020-05-04 12:39:48 -0600

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 12:40:23 -0600 )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 06:58:39 -0600 )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 10:48:22 -0600 )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 15:44:48 -0600 )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 08:12:02 -0600 )edit