ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 Mar 2024 11:19:42 +0100How to read a file which has rational functions?https://ask.sagemath.org/question/76631/how-to-read-a-file-which-has-rational-functions/ I have a large file which has rational functions and I would like to read it to Sagemath. The first two lines are
[[[4, -1]], (x7 + x20)/x19]
[[[4, -3], [4, -1]], (x8*x19 + x7*x21 + x20*x21)/(x19*x20)]
When I tried to read it, sagemath said that x_i's are not defined. Thank you very much!
lijr07Sun, 24 Mar 2024 11:19:42 +0100https://ask.sagemath.org/question/76631/errors when read a file with symbolshttps://ask.sagemath.org/question/68911/errors-when-read-a-file-with-symbols/ I am trying to read a file with contents like:
[4/t^4, [[-3, 3, -3], [-1, 1, -3], [1, 1, -1]]]
I use the following codes:
fp1='/Users/jianrongli/Dropbox/Georgios/data/decomposition_of_Lm_tensor_Lm.txt'
with open(fp1, 'r') as fp:
L = [sage_eval(line) for line in fp.readlines() if line.strip()]
But it has errors:
NameError: name 't' is not defined
Is there some way to fix this? Thank you very much.lijr07Fri, 02 Jun 2023 11:11:00 +0200https://ask.sagemath.org/question/68911/Building Sage 8.9 from source failshttps://ask.sagemath.org/question/48276/building-sage-89-from-source-fails/I am trying to build Sage 8.9 from source on Linux (Ubuntu 16.04, gcc 6). It fails. I could build Sage 8.8 on the same machine without problems.
It says that python2 and python3 failed to build, and suggests to look at the log files. The log files contain:
ImportError: No module named readline
readline module failed to import
and
ModuleNotFoundError: No module named 'readline'
readline module failed to import
Has anyone experienced the same and is there a simple solution?
Unfortunately, I do not have root access myself, thus I can't quickly try to install the readline dev package.
SzabolcsFri, 11 Oct 2019 13:06:28 +0200https://ask.sagemath.org/question/48276/