When I execute this line
py
print(fricas('3 * 5'))
, I got error:
Traceback (most recent call last):
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/expect.py", line 1518, in __init__
self._name = parent._create(value, name=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/interface.py", line 520, in _create
self.set(name, value)
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/fricas.py", line 681, in set
self._check_errors(value, output)
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/fricas.py", line 574, in _check_errors
raise RuntimeError("An error occurred when FriCAS evaluated '%s':\n%s" % (line, output))
RuntimeError: An error occurred when FriCAS evaluated '3 * 5':
Function declaration sageprint : InputForm -> String has been added to
workspace.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/tmp/int.sage.py", line 8, in <module>
print(fricas('3 * 5'))
^^^^^^^^^^^^^^^
File "sage/misc/lazy_import.pyx", line 406, in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:6293)
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/interface.py", line 299, in __call__
return cls(self, x, name=name)
^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniforge3/envs/sage/lib/python3.12/site-packages/sage/interfaces/expect.py", line 1523, in __init__
raise TypeError(*x.args)
TypeError: An error occurred when FriCAS evaluated '3 * 5':
Function declaration sageprint : InputForm -> String has been added to
workspace.
There is a qustion, Problems reproducing code on SageMath on a Jupyter NB with dependence on FriCAS, asking about the same erro. The comment under that question suggested install fricas with --enable-fricas
flag while installing SageMath from source. However, it seems that --enable-fricas
cannot be used when installing SageMath from conda.
How to use the FriCAS interface when installed SageMath via conda? How to know which version is requested by the assigned version of SageMath (i.e. version 10.5)?
versions of my packages installed: - SageMath: 10.5 - FriCAS: 1.3.10 - Python: 3.12.9