SageMath on Fedora32 works with errors!

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

aszanti gravatar image

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

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/ in __call __ (self, source, filename, symbol)

     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



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 +0200 )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 +0200 )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'SAGE', k) or'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 +0200 )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 +0200 )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 +0200 )edit